removed files

attempting commit with fewer files; these are the ones removed
This commit is contained in:
Daniel J. Summers committed 2017-07-29 16:27:48 -05:00
1 parent 03fd1d0a18
commit 632f06ac5f
52 files changed
-1342

No files matched your search

-166
View File
@@ -1,166 +0,0 @@
{
"name": "my-prayer-journal",
"type": "project:application",
"platform": {
"id": "web",
"displayName": "Web",
"output": "scripts",
"index": "index.html",
"baseDir": "."
},
"transpiler": {
"id": "typescript",
"displayName": "TypeScript",
"fileExtension": ".ts",
"dtsSource": [
"./custom_typings/**/*.d.ts"
],
"source": "src/**/*.ts"
},
"markupProcessor": {
"id": "minimum",
"displayName": "Minimal Minification",
"fileExtension": ".html",
"source": "src/**/*.html"
},
"cssProcessor": {
"id": "none",
"displayName": "None",
"fileExtension": ".css",
"source": "src/**/*.css"
},
"editor": {
"id": "vscode",
"displayName": "Visual Studio Code"
},
"unitTestRunner": {
"id": "karma",
"displayName": "Karma",
"source": "test/unit/**/*.ts"
},
"paths": {
"root": "src",
"resources": "resources",
"elements": "resources/elements",
"attributes": "resources/attributes",
"valueConverters": "resources/value-converters",
"bindingBehaviors": "resources/binding-behaviors"
},
"testFramework": {
"id": "jasmine",
"displayName": "Jasmine"
},
"build": {
"targets": [
{
"id": "web",
"displayName": "Web",
"output": "scripts",
"index": "index.html",
"baseDir": "."
}
],
"loader": {
"type": "require",
"configTarget": "vendor-bundle.js",
"includeBundleMetadataInConfig": "auto",
"plugins": [
{
"name": "text",
"extensions": [
".html",
".css"
],
"stub": true
}
]
},
"options": {
"minify": "stage & prod",
"sourcemaps": "dev & stage"
},
"bundles": [
{
"name": "app-bundle.js",
"source": [
"[**/*.js]",
"**/*.{css,html}"
]
},
{
"name": "vendor-bundle.js",
"prepend": [
"node_modules/bluebird/js/browser/bluebird.core.js",
"node_modules/aurelia-cli/lib/resources/scripts/configure-bluebird.js",
"node_modules/requirejs/require.js"
],
"dependencies": [
"aurelia-binding",
"aurelia-bootstrapper",
"aurelia-dependency-injection",
"aurelia-event-aggregator",
"aurelia-framework",
"aurelia-fetch-client",
"aurelia-history",
"aurelia-history-browser",
"aurelia-loader",
"aurelia-loader-default",
"aurelia-logging",
"aurelia-logging-console",
"aurelia-metadata",
"aurelia-pal",
"aurelia-pal-browser",
"aurelia-path",
"aurelia-polyfills",
"aurelia-route-recognizer",
"aurelia-router",
"aurelia-task-queue",
"aurelia-templating",
"aurelia-templating-binding",
"text",
{
"name": "aurelia-templating-resources",
"path": "../node_modules/aurelia-templating-resources/dist/amd",
"main": "aurelia-templating-resources"
},
{
"name": "aurelia-templating-router",
"path": "../node_modules/aurelia-templating-router/dist/amd",
"main": "aurelia-templating-router"
},
{
"name": "aurelia-testing",
"path": "../node_modules/aurelia-testing/dist/amd",
"main": "aurelia-testing",
"env": "dev"
},
"jquery",
{
"name": "bootstrap",
"path": "../node_modules/bootstrap/dist",
"main": "js/bootstrap.min",
"deps": ["jquery"],
"exports": "$",
"resources": [
"css/bootstrap.css"
]
},
{
"name": "nprogress",
"path": "../node_modules/nprogress",
"main": "nprogress",
"resources": [
"nprogress.css"
]
},
{
"name": "auth0-lock",
"path": "lib",
"main": "lock.min",
"exports": "Auth0Lock"
}
]
}
]
}
}
@@ -1,4 +0,0 @@
export default {
debug: true,
testing: true
};
@@ -1,4 +0,0 @@
export default {
debug: false,
testing: false
};
@@ -1,4 +0,0 @@
export default {
debug: true,
testing: false
};
@@ -1,4 +0,0 @@
{
"name": "attribute",
"description": "Creates a custom attribute class and places it in the project resources."
}
@@ -1,38 +0,0 @@
import {inject} from 'aurelia-dependency-injection';
import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli';
@inject(Project, CLIOptions, UI)
export default class AttributeGenerator {
constructor(private project: Project, private options: CLIOptions, private ui: UI) { }
execute() {
return this.ui
.ensureAnswer(this.options.args[0], 'What would you like to call the custom attribute?')
.then(name => {
let fileName = this.project.makeFileName(name);
let className = this.project.makeClassName(name);
this.project.attributes.add(
ProjectItem.text(`${fileName}.ts`, this.generateSource(className))
);
return this.project.commitChanges()
.then(() => this.ui.log(`Created ${fileName}.`));
});
}
generateSource(className) {
return `import {autoinject} from 'aurelia-framework';
@autoinject()
export class ${className}CustomAttribute {
constructor(private element: Element) { }
valueChanged(newValue, oldValue) {
}
}
`
}
}
@@ -1,4 +0,0 @@
{
"name": "binding-behavior",
"description": "Creates a binding behavior class and places it in the project resources."
}
@@ -1,37 +0,0 @@
import {inject} from 'aurelia-dependency-injection';
import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli';
@inject(Project, CLIOptions, UI)
export default class BindingBehaviorGenerator {
constructor(private project: Project, private options: CLIOptions, private ui: UI) { }
execute() {
return this.ui
.ensureAnswer(this.options.args[0], 'What would you like to call the binding behavior?')
.then(name => {
let fileName = this.project.makeFileName(name);
let className = this.project.makeClassName(name);
this.project.bindingBehaviors.add(
ProjectItem.text(`${fileName}.ts`, this.generateSource(className))
);
return this.project.commitChanges()
.then(() => this.ui.log(`Created ${fileName}.`));
});
}
generateSource(className) {
return `export class ${className}BindingBehavior {
bind(binding, source) {
}
unbind(binding, source) {
}
}
`
}
}
@@ -1,4 +0,0 @@
{
"name": "component",
"description": "Creates a custom component class and template (view model and view), placing them in the project source folder (or optionally in sub folders)."
}
@@ -1,49 +0,0 @@
import { inject } from 'aurelia-dependency-injection';
import { Project, ProjectItem, CLIOptions, UI } from 'aurelia-cli';
var path = require('path');
@inject(Project, CLIOptions, UI)
export default class ElementGenerator {
constructor(private project: Project, private options: CLIOptions, private ui: UI) { }
execute() {
let self = this;
return this.ui
.ensureAnswer(this.options.args[0], 'What would you like to call the component?')
.then(name => {
return self.ui.ensureAnswer(this.options.args[1], 'What sub-folder would you like to add it to?\nIf it doesn\'t exist it will be created for you.\n\nDefault folder is the source folder (src).', ".")
.then(subFolders => {
let fileName = this.project.makeFileName(name);
let className = this.project.makeClassName(name);
self.project.root.add(
ProjectItem.text(path.join(subFolders, fileName + ".ts"), this.generateJSSource(className)),
ProjectItem.text(path.join(subFolders, fileName + ".html"), this.generateHTMLSource(className))
);
return this.project.commitChanges()
.then(() => this.ui.log(`Created ${name} in the '${path.join(self.project.root.name, subFolders)}' folder`));
});
});
}
generateJSSource(className) {
return `export class ${className} {
message: string;
constructor() {
this.message = 'Hello world';
}
}`
}
generateHTMLSource(className) {
return `<template>
<h1>\${message}</h1>
</template>`
}
}
@@ -1,4 +0,0 @@
{
"name": "element",
"description": "Creates a custom element class and template, placing them in the project resources."
}
@@ -1,44 +0,0 @@
import {inject} from 'aurelia-dependency-injection';
import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli';
@inject(Project, CLIOptions, UI)
export default class ElementGenerator {
constructor(private project: Project, private options: CLIOptions, private ui: UI) { }
execute() {
return this.ui
.ensureAnswer(this.options.args[0], 'What would you like to call the custom element?')
.then(name => {
let fileName = this.project.makeFileName(name);
let className = this.project.makeClassName(name);
this.project.elements.add(
ProjectItem.text(`${fileName}.ts`, this.generateJSSource(className)),
ProjectItem.text(`${fileName}.html`, this.generateHTMLSource(className))
);
return this.project.commitChanges()
.then(() => this.ui.log(`Created ${fileName}.`));
});
}
generateJSSource(className) {
return `import {bindable} from 'aurelia-framework';
export class ${className} {
@bindable value;
valueChanged(newValue, oldValue) {
}
}
`
}
generateHTMLSource(className) {
return `<template>
<h1>\${value}</h1>
</template>`
}
}
@@ -1,4 +0,0 @@
{
"name": "generator",
"description": "Creates a generator class and places it in the project generators folder."
}
@@ -1,65 +0,0 @@
import {inject} from 'aurelia-dependency-injection';
import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli';
@inject(Project, CLIOptions, UI)
export default class GeneratorGenerator {
constructor(private project: Project, private options: CLIOptions, private ui: UI) { }
execute() {
return this.ui
.ensureAnswer(this.options.args[0], 'What would you like to call the generator?')
.then(name => {
let fileName = this.project.makeFileName(name);
let className = this.project.makeClassName(name);
this.project.generators.add(
ProjectItem.text(`${fileName}.ts`, this.generateSource(className))
);
return this.project.commitChanges()
.then(() => this.ui.log(`Created ${fileName}.`));
});
}
generateSource(className) {
return `import {autoinject} from 'aurelia-dependency-injection';
import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli';
@autoinject()
export default class ${className}Generator {
constructor(private project: Project, private options: CLIOptions, private ui: UI) { }
execute() {
return this.ui
.ensureAnswer(this.options.args[0], 'What would you like to call the new item?')
.then(name => {
let fileName = this.project.makeFileName(name);
let className = this.project.makeClassName(name);
this.project.elements.add(
ProjectItem.text(\`\${fileName}.js\`, this.generateSource(className))
);
return this.project.commitChanges()
.then(() => this.ui.log(\`Created \${fileName}.\`));
});
}
generateSource(className) {
return \`import {bindable} from 'aurelia-framework';
export class \${className} {
@bindable value;
valueChanged(newValue, oldValue) {
}
}
\`
}
}
`
}
}
@@ -1,4 +0,0 @@
{
"name": "task",
"description": "Creates a task and places it in the project tasks folder."
}
@@ -1,37 +0,0 @@
import {inject} from 'aurelia-dependency-injection';
import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli';
@inject(Project, CLIOptions, UI)
export default class TaskGenerator {
constructor(private project: Project, private options: CLIOptions, private ui: UI) { }
execute() {
return this.ui
.ensureAnswer(this.options.args[0], 'What would you like to call the task?')
.then(name => {
let fileName = this.project.makeFileName(name);
let functionName = this.project.makeFunctionName(name);
this.project.tasks.add(
ProjectItem.text(`${fileName}.ts`, this.generateSource(functionName))
);
return this.project.commitChanges()
.then(() => this.ui.log(`Created ${fileName}.`));
});
}
generateSource(functionName) {
return `import * as gulp from 'gulp';
import * as changed from 'gulp-changed';
import * as project from '../aurelia.json';
export default function ${functionName}() {
return gulp.src(project.paths.???)
.pipe(changed(project.paths.output, {extension: '.???'}))
.pipe(gulp.dest(project.paths.output));
}
`
}
}
@@ -1,4 +0,0 @@
{
"name": "value-converter",
"description": "Creates a value converter class and places it in the project resources."
}
@@ -1,37 +0,0 @@
import {inject} from 'aurelia-dependency-injection';
import {Project, ProjectItem, CLIOptions, UI} from 'aurelia-cli';
@inject(Project, CLIOptions, UI)
export default class ValueConverterGenerator {
constructor(private project: Project, private options: CLIOptions, private ui: UI) { }
execute() {
return this.ui
.ensureAnswer(this.options.args[0], 'What would you like to call the value converter?')
.then(name => {
let fileName = this.project.makeFileName(name);
let className = this.project.makeClassName(name);
this.project.valueConverters.add(
ProjectItem.text(`${fileName}.ts`, this.generateSource(className))
);
return this.project.commitChanges()
.then(() => this.ui.log(`Created ${fileName}.`));
});
}
generateSource(className) {
return `export class ${className}ValueConverter {
toView(value) {
}
fromView(value) {
}
}
`
}
}
-11
View File
@@ -1,11 +0,0 @@
{
"name": "build",
"description": "Builds and processes all application assets.",
"flags": [
{
"name": "env",
"description": "Sets the build environment.",
"type": "string"
}
]
}
-26
View File
@@ -1,26 +0,0 @@
import * as gulp from 'gulp';
import transpile from './transpile';
import processMarkup from './process-markup';
import processCSS from './process-css';
import copyFiles from './copy-files';
import {build} from 'aurelia-cli';
import * as project from '../aurelia.json';
export default gulp.series(
readProjectConfiguration,
gulp.parallel(
transpile,
processMarkup,
processCSS,
copyFiles
),
writeBundles
);
function readProjectConfiguration() {
return build.src(project);
}
function writeBundles() {
return build.dest();
}
@@ -1,45 +0,0 @@
import * as gulp from 'gulp';
import * as path from 'path';
import * as minimatch from 'minimatch';
import * as changedInPlace from 'gulp-changed-in-place';
import * as project from '../aurelia.json';
export default function copyFiles(done) {
if (typeof project.build.copyFiles !== 'object') {
done();
return;
}
const instruction = getNormalizedInstruction();
const files = Object.keys(instruction);
return gulp.src(files)
.pipe(changedInPlace({ firstPass: true }))
.pipe(gulp.dest(x => {
const filePath = prepareFilePath(x.path);
const key = files.find(f => minimatch(filePath, f));
return instruction[key];
}));
}
function getNormalizedInstruction() {
const files = project.build.copyFiles;
let normalizedInstruction = {};
for (let key in files) {
normalizedInstruction[path.posix.normalize(key)] = files[key];
}
return normalizedInstruction;
}
function prepareFilePath(filePath) {
let preparedPath = filePath.replace(process.cwd(), '').substring(1);
//if we are running on windows we have to fix the path
if (/^win/.test(process.platform)) {
preparedPath = preparedPath.replace(/\\/g, '/');
}
return preparedPath;
}
@@ -1,10 +0,0 @@
import * as gulp from 'gulp';
import * as changedInPlace from 'gulp-changed-in-place';
import * as project from '../aurelia.json';
import {build} from 'aurelia-cli';
export default function processCSS() {
return gulp.src(project.cssProcessor.source)
.pipe(changedInPlace({firstPass:true}))
.pipe(build.bundle());
};
@@ -1,17 +0,0 @@
import * as gulp from 'gulp';
import * as htmlmin from 'gulp-htmlmin';
import * as changedInPlace from 'gulp-changed-in-place';
import * as project from '../aurelia.json';
import {build} from 'aurelia-cli';
export default function processMarkup() {
return gulp.src(project.markupProcessor.source)
.pipe(changedInPlace({firstPass:true}))
.pipe(htmlmin({
removeComments: true,
collapseWhitespace: true,
minifyCSS: true,
minifyJS: true
}))
.pipe(build.bundle());
}
-16
View File
@@ -1,16 +0,0 @@
{
"name": "run",
"description": "Builds the application and serves up the assets via a local web server, watching files for changes as you work.",
"flags": [
{
"name": "env",
"description": "Sets the build environment.",
"type": "string"
},
{
"name": "watch",
"description": "Watches source files for changes and refreshes the app automatically.",
"type": "boolean"
}
]
}
-73
View File
@@ -1,73 +0,0 @@
import * as gulp from 'gulp';
import * as browserSync from 'browser-sync';
import * as historyApiFallback from 'connect-history-api-fallback/lib';
import * as project from '../aurelia.json';
import build from './build';
import {CLIOptions} from 'aurelia-cli';
function onChange(path) {
console.log(`File Changed: ${path}`);
}
function reload(done) {
browserSync.reload();
done();
}
let serve = gulp.series(
build,
done => {
browserSync({
online: false,
open: false,
port: 9000,
logLevel: 'silent',
server: {
baseDir: [project.platform.baseDir],
middleware: [historyApiFallback(), function(req, res, next) {
res.setHeader('Access-Control-Allow-Origin', '*');
next();
}]
}
}, function (err, bs) {
if (err) return done(err);
let urls = bs.options.get('urls').toJS();
console.log(`Application Available At: ${urls.local}`);
console.log(`BrowserSync Available At: ${urls.ui}`);
done();
});
}
);
let refresh = gulp.series(
build,
reload
);
let watch = function(refreshCb, onChangeCb) {
return function(done) {
gulp.watch(project.transpiler.source, refreshCb).on('change', onChangeCb);
gulp.watch(project.markupProcessor.source, refreshCb).on('change', onChangeCb);
gulp.watch(project.cssProcessor.source, refreshCb).on('change', onChangeCb);
//see if there are static files to be watched
if (typeof project.build.copyFiles === 'object') {
const files = Object.keys(project.build.copyFiles);
gulp.watch(files, refreshCb).on('change', onChangeCb);
}
};
};
let run;
if (CLIOptions.hasFlag('watch')) {
run = gulp.series(
serve,
watch(refresh, onChange)
);
} else {
run = serve;
}
export { run as default, watch };
-16
View File
@@ -1,16 +0,0 @@
{
"name": "test",
"description": "Runs all unit tests and reports the results.",
"flags": [
{
"name": "env",
"description": "Sets the build environment.",
"type": "string"
},
{
"name": "watch",
"description": "Watches test files for changes and re-runs the tests automatically.",
"type": "boolean"
}
]
}
-40
View File
@@ -1,40 +0,0 @@
import * as gulp from 'gulp';
import {Server as Karma} from 'karma';
import {CLIOptions} from 'aurelia-cli';
import build from './build';
import {watch} from './run';
import * as path from 'path';
function log(message) {
console.log(message); //eslint-disable-line no-console
}
function onChange(path) {
log(`File Changed: ${path}`);
}
let karma = done => {
new Karma({
configFile: path.join(__dirname, '/../../karma.conf.js'),
singleRun: !CLIOptions.hasFlag('watch')
}, done).start();
};
let unit;
if (CLIOptions.hasFlag('watch')) {
unit = gulp.series(
build,
gulp.parallel(
watch(build, onChange),
karma
)
);
} else {
unit = gulp.series(
build,
karma
);
}
export default unit;
@@ -1,44 +0,0 @@
import * as gulp from 'gulp';
import * as changedInPlace from 'gulp-changed-in-place';
import * as plumber from 'gulp-plumber';
import * as sourcemaps from 'gulp-sourcemaps';
import * as notify from 'gulp-notify';
import * as rename from 'gulp-rename';
import * as ts from 'gulp-typescript';
import * as project from '../aurelia.json';
import {CLIOptions, build} from 'aurelia-cli';
import * as eventStream from 'event-stream';
function configureEnvironment() {
let env = CLIOptions.getEnvironment();
return gulp.src(`aurelia_project/environments/${env}.ts`)
.pipe(changedInPlace({firstPass:true}))
.pipe(rename('environment.ts'))
.pipe(gulp.dest(project.paths.root));
}
var typescriptCompiler = typescriptCompiler || null;
function buildTypeScript() {
typescriptCompiler = ts.createProject('tsconfig.json', {
"typescript": require('typescript')
});
let dts = gulp.src(project.transpiler.dtsSource);
let src = gulp.src(project.transpiler.source)
.pipe(changedInPlace({firstPass: true}));
return eventStream.merge(dts, src)
.pipe(plumber({ errorHandler: notify.onError('Error: <%= error.message %>') }))
.pipe(sourcemaps.init())
.pipe(typescriptCompiler())
.pipe(sourcemaps.write({ sourceRoot: 'src' }))
.pipe(build.bundle());
}
export default gulp.series(
configureEnvironment,
buildTypeScript
);
Binary file not shown.
-44
View File
@@ -1,44 +0,0 @@
'use strict';
const path = require('path');
const project = require('./aurelia_project/aurelia.json');
const tsconfig = require('./tsconfig.json');
let testSrc = [
{ pattern: project.unitTestRunner.source, included: false },
'test/aurelia-karma.js'
];
let output = project.platform.output;
let appSrc = project.build.bundles.map(x => path.join(output, x.name));
let entryIndex = appSrc.indexOf(path.join(output, project.build.loader.configTarget));
let entryBundle = appSrc.splice(entryIndex, 1)[0];
let files = [entryBundle].concat(testSrc).concat(appSrc);
module.exports = function(config) {
config.set({
basePath: '',
frameworks: [project.testFramework.id],
files: files,
exclude: [],
preprocessors: {
[project.unitTestRunner.source]: [project.transpiler.id]
},
typescriptPreprocessor: {
typescript: require('typescript'),
options: tsconfig.compilerOptions
},
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
// client.args must be a array of string.
// Leave 'aurelia-root', project.paths.root in this order so we can find
// the root of the aurelia project.
client: {
args: ['aurelia-root', project.paths.root]
}
});
};
-1
View File
@@ -1 +0,0 @@
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///auth0.min.js","\\node_modules\\auth0-js\\build/webpack:/webpack/bootstrap 7b1004490308b0712546","webpack:///~/url-join/lib/url-join.js","webpack:///src/helper/object.js","webpack:///src/helper/window.js","webpack:///src/helper/assert.js","webpack:///~/qs/lib/index.js","webpack:///src/helper/response-handler.js","webpack:///~/qs/lib/formats.js","webpack:///~/qs/lib/utils.js","webpack:///src/version.js","webpack:///src/helper/request-builder.js","webpack:///src/helper/warn.js","webpack:///~/qs/lib/parse.js","webpack:///~/qs/lib/stringify.js","webpack:///~/superagent/lib/is-object.js","webpack:///~/base64-js/index.js","webpack:///~/idtoken-verifier/src/helpers/base64.js","webpack:///~/superagent/lib/client.js","webpack:///~/winchan/winchan.js","webpack:///src/authentication/index.js","webpack:///src/helper/base64_url.js","webpack:///src/helper/error.js","webpack:///src/web-auth/transaction-manager.js","webpack:///~/component-emitter/index.js","webpack:///~/crypto-js/core.js","webpack:///~/crypto-js/sha256.js","webpack:///~/idtoken-verifier/src/helpers/dummy-cache.js","webpack:///~/idtoken-verifier/src/helpers/error.js","webpack:///~/idtoken-verifier/src/helpers/jwks.js","webpack:///~/idtoken-verifier/src/helpers/rsa-verifier.js","webpack:///~/idtoken-verifier/src/index.js","webpack:///~/jsbn/index.js","webpack:///~/superagent/lib/is-function.js","webpack:///~/superagent/lib/request-base.js","webpack:///~/superagent/lib/response-base.js","webpack:///~/superagent/lib/should-retry.js","webpack:///~/superagent/lib/utils.js","webpack:///src/authentication/db-connection.js","webpack:///src/authentication/passwordless-authentication.js","webpack:///src/helper/cookies.js","webpack:///src/helper/iframe-handler.js","webpack:///src/helper/object-assign.js","webpack:///src/helper/parameters-whitelist.js","webpack:///src/helper/plugins.js","webpack:///src/helper/popup-handler.js","webpack:///src/helper/random.js","webpack:///src/helper/storage.js","webpack:///src/helper/storage/cookie.js","webpack:///src/helper/storage/dummy.js","webpack:///src/helper/storage/handler.js","webpack:///src/helper/url.js","webpack:///src/index.js","webpack:///src/management/index.js","webpack:///src/web-auth/cross-origin-authentication.js","webpack:///src/web-auth/index.js","webpack:///src/web-auth/popup.js","webpack:///src/web-auth/redirect.js","webpack:///src/web-auth/silent-authentication-handler.js","webpack:///src/web-auth/username-password.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_RESULT__","name","context","definition","undefined","normalize","str","options","replace","input","arguments","joined","slice","join","pick","object","keys","reduce","prev","key","getKeysNotIn","obj","allowedKeys","notAllowed","indexOf","push","objectValues","values","extend","params","unshift","objectAssign","get","apply","merge","base","with","object2","keys2","blacklist","blacklistedKeys","Object","camelToSnake","code","newKey","index","wasPrevNumber","wasPrevUppercase","length","charCodeAt","toLowerCase","snakeToCamel","parts","split","charAt","toUpperCase","shift","toSnakeCase","exceptions","assert","isArray","toCamelCase","global","redirect","url","window","location","getDocument","document","getWindow","attribute","o","attr","type","text","Error","variable","value","check","config","attributes","optional","message","a","condition","value_message","array","supportsIsArray","Array","toString","prototype","stringify","parse","formats","wrapCallback","cb","ignoreCasing","err","data","errObj","error","original","response","statusCode","statusText","body","error_code","status","description","errorDescription","error_description","details","policy","objectHelper","buildResponse","String","percentTwenties","default","formatters","RFC1738","RFC3986","has","hasOwnProperty","hexTable","i","arrayToObject","source","plainObjects","create","target","allowPrototypes","concat","mergeTarget","forEach","item","acc","decode","decodeURIComponent","e","encode","string","out","compact","references","refs","lookup","compacted","isRegExp","isBuffer","constructor","raw","RequestWrapper","req","request","method","_data","headers","_header","RequestObj","RequestBuilder","_sendTelemetry","_telemetryInfo","base64Url","version","abort","getMethod","getBody","getUrl","getHeaders","set","send","withCredentials","end","setCommonConfiguration","ongoingRequest","noHeaders","getTelemetryData","clientInfo","jsonClientInfo","JSON","post","patch","Warn","disableWarnings","warning","console","warn","utils","defaults","allowDots","arrayLimit","decoder","delimiter","depth","parameterLimit","strictNullHandling","parseValues","Infinity","val","part","pos","parseObject","chain","cleanRoot","parseInt","isNaN","parseArrays","parseKeys","giveLine truncated
-36
View File
@@ -1,36 +0,0 @@
<template>
<require from="bootstrap/css/bootstrap.css"></require>
<require from="./styles.css"></require>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a route-href="route: home" class="navbar-brand">myPrayerJournal</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li if.bind="!isAuthenticated()" click.delegate="logon()">Log On</li>
<li if.bind="isAuthenticated()" click.delegate="logoff()">Log Off</li>
</ul>
</div>
</div>
</nav>
<loading-indicator loading.bind="router.isNavigating || api.isRequesting"></loading-indicator>
<div class="container body-content">
<div class="row">
<h2 class.bind="'mpj-page-title' + ('' === pageTitle ? ' hidden' : '')" textcontent.bind="pageTitle"></h2>
<router-view class="col-xs-12" swap-order="with"></router-view>
</div>
<div class="row">
<footer class="mpj-footer">
<p class="text-right">myPrayerJournal v0.8.1</p>
</footer>
</div>
</div>
</template>
-80
View File
@@ -1,80 +0,0 @@
import {Router, RouterConfiguration} from "aurelia-router"
import {EventAggregator} from "aurelia-event-aggregator"
import {inject} from "aurelia-framework"
import {HttpClient} from "aurelia-fetch-client"
import {PageTitle} from "./messages"
import {Auth0Lock} from "auth0-lock"
@inject(EventAggregator, HttpClient)
export class App {
router: Router;
pageTitle: string;
lock = new Auth0Lock('Of2s0RQCQ3mt3dwIkOBY5h85J9sXbF2n', 'djs-consulting.auth0.com', {
oidcConformant: true,
autoclose: true,
auth: {
redirectUrl: "http://localhost:8080/user/log-on",
responseType: 'token id_token',
audience: `https://djs-consulting.auth0.com/userinfo`,
params: {
scope: 'openid'
}
}
})
private setSession(authResult): void {
// Set the time that the access token will expire at
const expiresAt = JSON.stringify((authResult.expiresIn * 1000) + new Date().getTime())
localStorage.setItem('access_token', authResult.accessToken)
localStorage.setItem('id_token', authResult.idToken)
localStorage.setItem('expires_at', expiresAt)
}
public logoff(): void {
// Remove tokens and expiry time from localStorage
localStorage.removeItem('access_token')
localStorage.removeItem('id_token')
localStorage.removeItem('expires_at')
// Go back to the home route
this.router.navigateToRoute("")
}
public isAuthenticated(): boolean {
// Check whether the current time is past the
// access token's expiry time
const expiresAt = JSON.parse(localStorage.getItem('expires_at'))
return new Date().getTime() < expiresAt
}
constructor(private ea: EventAggregator, private http: HttpClient) {
this.ea.subscribe(PageTitle, msg => this.pageTitle = msg.title)
var self = this
this.lock.on('authenticated', (authResult) => {
if (authResult && authResult.accessToken && authResult.idToken) {
this.setSession(authResult)
this.router.navigateToRoute("")
}
});
this.lock.on('authorization_error', (err) => {
this.router.navigateToRoute("")
console.log(err)
alert(`Error: ${err.error}. Check the console for further details.`)
});
}
configureRouter(config: RouterConfiguration, router: Router){
config.title = "myPrayerJournal"
config.options.pushState = true
config.options.root = "/"
config.map([
{ route: "", moduleId: "home", name: "home", title: "Welcome" }
])
this.router = router
}
public logon() {
this.lock.show()
}
}
-4
View File
@@ -1,4 +0,0 @@
export default {
debug: true,
testing: true
};
-11
View File
@@ -1,11 +0,0 @@
<template>
<p>
myPrayerJournal is a place where individuals can record their prayer requests, record that they prayed for them,
update them as God moves in the situation, and record a final answer received on that request. It will also allow
individuals to review their answered prayers.
</p>
<p>
This site is currently in very limited alpha, as it is being developed with a core group of test users. If this is
something you are interested in using, check back around mid-June 2017 to check on the development progress.
</p>
</template>
-10
View File
@@ -1,10 +0,0 @@
import {inject} from 'aurelia-framework';
import {EventAggregator} from "aurelia-event-aggregator"
import {PageTitle} from "./messages"
@inject(EventAggregator)
export class Home {
constructor(private ea: EventAggregator) {
this.ea.publish(new PageTitle("Welcome to myPrayerJournal"));
}
}
-10
View File
@@ -1,10 +0,0 @@
/*!
* lock v10.16.0
*
* Author: Auth0 <support@auth0.com> (http://auth0.com)
* Date: 5/8/2017, 8:23:20 PM
* License: MIT
*
*/
!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=366)}([function(t,e,n){"use strict";t.exports=n(26)},function(t,e,n){"use strict";function r(t,e,n,r,i,o){var a=jt(t,at.a.fromJS({clientBaseUrl:z(r,n),tenantBaseUrl:v(r,n),languageBaseUrl:b(r,n),auth:m(r),clientID:e,domain:n,emitEventFn:o,hookRunner:i,useTenantInfo:r.__useTenantInfo||!1,oidcConformant:r.oidcConformant||!1,hashCleanup:r.hashCleanup!==!1,allowedConnections:at.a.fromJS(r.allowedConnections||[]),ui:L(t,r),defaultADUsernameFromEmailPrefix:r.defaultADUsernameFromEmailPrefix!==!1,prefill:r.prefill||{}}));return a=lt.initI18n(a)}function i(t){return t.get("id")}function o(t){return Dt(t,"clientID")}function a(t){return Dt(t,"domain")}function s(t){return Dt(t,"clientBaseUrl")}function u(t){return Dt(t,"tenantBaseUrl")}function c(t){return Dt(t,"useTenantInfo")}function l(t){return Dt(t,"oidcConformant")}function M(t){return Dt(t,"languageBaseUrl")}function p(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t=wt(t,"submitting",e),t=D(t),t=n&&!e?d(t,n):f(t)}function g(t){return mt(t,"submitting",!1)}function d(t,e){return wt(t,"globalError",e)}function h(t){return mt(t,"globalError","")}function f(t){return zt(t,"globalError")}function y(t,e){return wt(t,"globalSuccess",e)}function N(t){return mt(t,"globalSuccess","")}function D(t){return zt(t,"globalSuccess")}function j(t){return mt(t,"render",!1)}function I(t){return zt(t,"render")}function L(t,e){var r=!e.container&&(void 0===e.closable||!!e.closable),i=e.theme||{},o=i.labeledSubmitButton,a=i.hideMainScreenTitle,s=i.logo,u=i.primaryColor,c=i.authButtons,l=null!==e.avatar,M=e.avatar&&"function"==typeof e.avatar.url&&"function"==typeof e.avatar.displayName&&e.avatar,p=M||gt;return new at.a.fromJS({containerID:e.container||"auth0-lock-container-"+t,appendContainer:!e.container,autoclose:void 0!==e.autoclose&&(r&&e.autoclose),autofocus:void 0===e.autofocus?!(e.container||n.i(st.a)()):!!e.autofocus,avatar:l,avatarProvider:p,logo:"string"==typeof s?s:void 0,closable:r,hideMainScreenTitle:!!a,labeledSubmitButton:void 0===o||!!o,language:void 0===e.language?"en":pt()(e.language||"").toLowerCase(),dict:"object"===yt(e.languageDictionary)?e.languageDictionary:{},disableWarnings:void 0!==e.disableWarnings&&!!e.disableWarnings,mobile:void 0!==e.mobile&&!!e.mobile,popupOptions:void 0===e.popupOptions?{}:e.popupOptions,primaryColor:"string"==typeof u?u:void 0,rememberLastLogin:void 0===e.rememberLastLogin||!!e.rememberLastLogin,authButtonsTheme:"object"===(void 0===c?"undefined":yt(c))?c:{}})}function m(t){var e=t.auth||{},n=e.audience,r=e.connectionScopes,i=e.params,o=e.autoParseHash,a=e.redirect,s=e.redirectUrl,u=e.responseMode,c=e.responseType,l=e.sso,M=e.state,p=e.nonce,g=t.oidcConformant;if(n="string"==typeof n?n:void 0,r="object"===(void 0===r?"undefined":yt(r))?r:{},i="object"===(void 0===i?"undefined":yt(i))?i:{},s="string"==typeof s&&s?s:null,o="boolean"!=typeof o||o,a="boolean"!=typeof a||a,u="string"==typeof u?u:void 0,M="string"==typeof M?M:void 0,p="string"==typeof p?p:void 0,c="string"==typeof c?c:s?"code":"token",s=s||window.location.href,l="boolean"!=typeof l||l,g||"openid profile"!==pt()(i.scope||"")||O(t,"Usage of scope 'openid profile' is not recommended. See https://auth0.com/docs/scopes for more details."),g&&!a&&c.indexOf("id_token")>-1)throw new Error("It is not possible to request an 'id_token' while using popup mode.");if(!g&&n)throw new Error("It is not possible to use the `auth.audience` option when the `oidcConformant` flag is set to false");return g||i.scope||(i.scope="openid"),at.a.fromJS({audience:n,connectionScopes:r,params:i,autoParseHash:o,redirect:a,redirectUrl:s,responseMode:u,responseType:c,sso:l,state:M,nonce:p})}function w(t,e){return at.a.fromJS(e).merge(Dt(t,"auth")).toJS()}function z(t,e){if(t.clientBaseUrl&&"string"==typeof t.clientBaseUrl)return t.clientBaseUrl;if(t.configurationBaseUrl&&"string"==typeof t.configurationBaseUrl)return t.configurationBaseUrl;if(t.assetsUrl&&"string"==typeof t.assetsUrl)return t.assetsUrl;var r="https://"+e,i=n.i(ct.a)(r).hostname,o=".auth0.com";if(n.i(ut.a)(i,o)){var a=i.split(".");return a.length>3?"https://cdn."+a[a.length-3]+o:"https://cdn.auth0.com"}return r}function v(t,e){if(t.configurationBaseUrl&&"string"==typeof t.configurationBaseUrl)return it()(t.configurationBaseUrl,"info-v1.js");if(t.assetsUrl&&"string"==typeof t.assetsUrl)return t.assetsUrl;var e,r="https://"+e,i=n.i(ct.a)(r).hostname,o=".auth0.com",a="https://cdn.auth0.com",s=i.split("."),u=s[0];return n.i(ut.a)(i,o)?(e=sLine truncated
//# sourceMappingURL=lock.min.js.map
-18
View File
@@ -1,18 +0,0 @@
import {Aurelia} from 'aurelia-framework'
import environment from './environment';
export function configure(aurelia: Aurelia) {
aurelia.use
.standardConfiguration()
.feature('resources');
if (environment.debug) {
aurelia.use.developmentLogging();
}
if (environment.testing) {
aurelia.use.plugin('aurelia-testing');
}
aurelia.start().then(() => aurelia.setRoot());
}
-3
View File
@@ -1,3 +0,0 @@
export class PageTitle {
constructor(public title: string) { }
}
@@ -1,15 +0,0 @@
import * as nprogress from 'nprogress';
import {bindable, noView} from 'aurelia-framework';
@noView(['nprogress/nprogress.css'])
export class LoadingIndicator {
@bindable loading = false;
loadingChanged(newValue) {
if (newValue) {
nprogress.start();
} else {
nprogress.done();
}
}
}
-5
View File
@@ -1,5 +0,0 @@
import {FrameworkConfiguration} from 'aurelia-framework';
export function configure(config: FrameworkConfiguration) {
config.globalResources(['./elements/loading-indicator']);
}
-35
View File
@@ -1,35 +0,0 @@
body {
padding-top: 70px;
padding-bottom: 20px;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}
/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content {
padding-left: 15px;
padding-right: 15px;
}
.material-icons.md-18 {
font-size: 18px;
}
.material-icons.md-24 {
font-size: 24px;
}
.material-icons.md-36 {
font-size: 36px;
}
.material-icons.md-48 {
font-size: 48px;
}
.material-icons {
vertical-align: middle;
}
.mpj-page-title {
border-bottom: solid 1px lightgray;
margin-bottom: 20px;
}
.mpj-footer {
border-top: solid 1px lightgray;
margin-top: 20px;
}
-3
View File
@@ -1,3 +0,0 @@
export function areEqual(obj1, obj2) {
return Object.keys(obj1).every((key) => obj2.hasOwnProperty(key) && (obj1[key] === obj2[key]));
};
-87
View File
@@ -1,87 +0,0 @@
(function(global) {
var karma = global.__karma__;
var requirejs = global.requirejs
var locationPathname = global.location.pathname;
var root = 'src';
karma.config.args.forEach(function(value, index) {
if (value === 'aurelia-root') {
root = karma.config.args[index + 1];
}
});
if (!karma || !requirejs) {
return;
}
function normalizePath(path) {
var normalized = []
var parts = path
.split('?')[0] // cut off GET params, used by noext requirejs plugin
.split('/')
for (var i = 0; i < parts.length; i++) {
if (parts[i] === '.') {
continue
}
if (parts[i] === '..' && normalized.length && normalized[normalized.length - 1] !== '..') {
normalized.pop()
continue
}
normalized.push(parts[i])
}
// Use case of testing source code. RequireJS doesn't add .js extension to files asked via sibling selector
// If normalized path doesn't include some type of extension, add the .js to it
if (normalized.length > 0 && normalized[normalized.length - 1].indexOf('.') < 0) {
normalized[normalized.length - 1] = normalized[normalized.length - 1] + '.js'
}
return normalized.join('/')
}
function patchRequireJS(files, originalLoadFn, locationPathname) {
var IS_DEBUG = /debug\.html$/.test(locationPathname)
requirejs.load = function (context, moduleName, url) {
url = normalizePath(url)
if (files.hasOwnProperty(url) && !IS_DEBUG) {
url = url + '?' + files[url]
}
if (url.indexOf('/base') !== 0) {
url = '/base/' + url;
}
return originalLoadFn.call(this, context, moduleName, url)
}
var originalDefine = global.define;
global.define = function(name, deps, m) {
if (typeof name === 'string') {
originalDefine('/base/' + root + '/' + name, [name], function (result) { return result; });
}
return originalDefine(name, deps, m);
}
}
function requireTests() {
var TEST_REGEXP = /(spec)\.js$/i;
var allTestFiles = ['/base/test/unit/setup.js'];
Object.keys(window.__karma__.files).forEach(function(file) {
if (TEST_REGEXP.test(file)) {
allTestFiles.push(file);
}
});
require(allTestFiles, window.__karma__.start);
}
karma.loaded = function() {}; // make it async
patchRequireJS(karma.files, requirejs.load, locationPathname);
requireTests();
})(window);
-7
View File
@@ -1,7 +0,0 @@
import {App} from '../../src/app';
describe('the app', () => {
it('says hello', () => {
expect(new App().message).toBe('Hello World!');
});
});
-3
View File
@@ -1,3 +0,0 @@
import 'aurelia-polyfills';
import {initialize} from 'aurelia-pal-browser';
initialize();
-27
View File
@@ -1,27 +0,0 @@
{
"compileOnSave": false,
"compilerOptions": {
"sourceMap": true,
"target": "es5",
"module": "amd",
"declaration": false,
"noImplicitAny": false,
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"lib": ["es2017", "dom"]
},
"exclude": [
"node_modules",
"aurelia_project"
],
"filesGlob": [
"./src/**/*.ts",
"./test/**/*.ts",
"./custom_typings/**/*.d.ts"
],
"atom": {
"rewriteTsconfig": false
}
}
-5
View File
@@ -1,5 +0,0 @@
{
"rules": {
}
}
-5
View File
@@ -1,5 +0,0 @@
{
"globalDependencies": {
"nprogress": "registry:dt/nprogress#0.0.0+20161119044246"
}
}
-113
View File
@@ -1,113 +0,0 @@
// Generated by typings
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/253e456e3c0bf4bd34afaceb7dcbae282da14066/nprogress/index.d.ts
interface NProgressStatic {
/**
* Shows the progress bar and begins trickling progress.
* @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining.
*/
start(): NProgressStatic;
/**
* Finishes loading by transitioning it to 100%, then fading out.
* @param {boolean} forceShow Forces the progress bar to show, even if it's not being shown. (The default behavior is that .done() will not do anything if .start() isn't called.)
* @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining.
*/
done(forceShow?: boolean): NProgressStatic;
/**
* Increments the progress bar with a random amount. This will never get to 100%: use it for every image load (or similar).
* @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining.
*/
inc(): NProgressStatic;
/**
* Increments the progress bar with a set amount.
* @param {number} amount This will get the current status value and adds the value until status is max 0.994
* @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining.
*/
inc(amount: number): NProgressStatic;
/**
* Removes the progress indicator.
*/
remove(): void;
/**
* Sets the progress percentage.
* @param {number} progressPercent A number between 0.0 and 1.0 that represents the progress percentage.
* @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining.
*/
set(progressPercent: number): NProgressStatic;
/**
* Configures the progress indicator.
* @param {NProgressConfigureOptions} options An object containing the configuration options.
* @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining.
*/
configure(options: NProgressConfigureOptions): NProgressStatic;
/**
* Gets the NProgress version.
*/
version: string;
/**
* Gets the status. If started, it will be the last progress number set.
*/
status: any;
/**
* Gets whether progress has been started.
* @returns {boolean} Whether the progress has started.
*/
isStarted(): boolean;
}
interface NProgressConfigureOptions {
/**
* CSS selector to change the parent DOM element of the progress. Default is body.
*/
parent?: string
/**
* The minimum progress percentage. Default is 0.08.
*/
minimum?: number;
/**
* How often to trickle, in milliseconds. Default is 800.
*/
trickleSpeed?: number;
/**
* Whether to show the spinner. Defaults to true. Default is true.
*/
showSpinner?: boolean;
/**
* Whether to enable trickling the progress. Default is true.
*/
trickle?: boolean;
/**
* The CSS easing animation to use. Default is 'linear'.
*/
easing?: string;
/**
* The animation speed in milliseconds. Default is 200.
*/
speed?: number;
/**
* The HTML markup inserted for the progress indicator. To keep the progress bar working, keep an element with role='bar' in there.
*/
template?: string;
}
declare var NProgress: NProgressStatic;
declare module "nprogress" {
export = NProgress;
}
@@ -1,8 +0,0 @@
{
"resolution": "main",
"tree": {
"src": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/253e456e3c0bf4bd34afaceb7dcbae282da14066/nprogress/index.d.ts",
"raw": "registry:dt/nprogress#0.0.0+20161119044246",
"typings": "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/253e456e3c0bf4bd34afaceb7dcbae282da14066/nprogress/index.d.ts"
}
}
-1
View File
@@ -1 +0,0 @@
/// <reference path="globals/nprogress/index.d.ts" />