gina 0.7.3 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +65 -0
- package/README.md +48 -40
- package/ROADMAP.md +1 -0
- package/bin/cli +33 -4
- package/bin/cli-debug +37 -1
- package/bin/cmd +18 -0
- package/framework/v0.7.4/VERSION +1 -0
- package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/js/gina.js +1504 -621
- package/framework/v0.7.4/core/asset/plugin/dist/vendor/gina/js/gina.min.js +736 -0
- package/framework/v0.7.4/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
- package/framework/v0.7.4/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
- package/framework/{v0.7.3 → v0.7.4}/core/config.js +13 -3
- package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.js +268 -14
- package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-json.js +9 -2
- package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-nunjucks.js +88 -9
- package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-swig-async.js +87 -7
- package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-swig.js +115 -9
- package/framework/{v0.7.3 → v0.7.4}/core/gna.js +44 -2
- package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/validator/src/form-validator.js +43 -4
- package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/validator/src/main.js +847 -515
- package/framework/{v0.7.3 → v0.7.4}/core/router.js +139 -40
- package/framework/{v0.7.3 → v0.7.4}/core/server.express.js +5 -4
- package/framework/{v0.7.3 → v0.7.4}/core/server.isaac.js +93 -10
- package/framework/{v0.7.3 → v0.7.4}/core/server.js +348 -46
- package/framework/{v0.7.3 → v0.7.4}/helpers/context.js +47 -2
- package/framework/{v0.7.3 → v0.7.4}/helpers/data/src/main.js +10 -1
- package/framework/{v0.7.3 → v0.7.4}/helpers/prototypes.js +23 -1
- package/framework/v0.7.4/lib/cmd/bundle/inc/start-status.js +420 -0
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/restart.js +71 -1
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/start.js +207 -41
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/cache/clear.js +39 -8
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/cache/help.txt +3 -4
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/inc/ps-titles.js +62 -6
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/init.js +12 -1
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/restart.js +49 -11
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/status.js +23 -1
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/stop.js +150 -48
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/helper.js +24 -0
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/run.js +6 -0
- package/framework/{v0.7.3 → v0.7.4}/lib/cmd/index.js +8 -1
- package/framework/{v0.7.3 → v0.7.4}/lib/collection/src/main.js +373 -74
- package/framework/{v0.7.3 → v0.7.4}/lib/job/src/main.js +49 -5
- package/framework/{v0.7.3 → v0.7.4}/lib/lane/src/main.js +81 -5
- package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/main.js +184 -15
- package/framework/v0.7.4/lib/logger/src/redact.js +1003 -0
- package/framework/{v0.7.3 → v0.7.4}/lib/nunjucks-filters/src/main.js +118 -11
- package/framework/{v0.7.3 → v0.7.4}/lib/proc.js +27 -8
- package/framework/{v0.7.3 → v0.7.4}/lib/render-cache/src/main.js +97 -0
- package/framework/{v0.7.3 → v0.7.4}/lib/routing/src/main.js +140 -14
- package/framework/{v0.7.3 → v0.7.4}/lib/sqlite-driver.js +15 -5
- package/framework/{v0.7.3 → v0.7.4}/lib/swig-filters/src/main.js +123 -16
- package/framework/{v0.7.3 → v0.7.4}/package.json +1 -1
- package/gna.js +4 -4
- package/llms.txt +24 -22
- package/package.json +5 -4
- package/schema/settings.json +25 -1
- package/script/smoke_in_container.js +69 -12
- package/types/index.d.ts +3 -2
- package/utils/prototypes.js +37 -2
- package/framework/v0.7.3/VERSION +0 -1
- package/framework/v0.7.3/core/asset/plugin/dist/vendor/gina/js/gina.min.js +0 -726
- package/framework/v0.7.3/core/asset/plugin/dist/vendor/gina/js/gina.min.js.br +0 -0
- package/framework/v0.7.3/core/asset/plugin/dist/vendor/gina/js/gina.min.js.gz +0 -0
- package/framework/v0.7.3/lib/logger/src/redact.js +0 -391
- /package/framework/{v0.7.3 → v0.7.4}/AUTHORS +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/LICENSE +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/html/nolayout.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/html/static.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/img/android-chrome-192x192.png +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/img/android-chrome-512x512.png +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/img/apple-touch-icon.png +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/img/favicon-16x16.png +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/img/favicon-32x32.png +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/img/favicon.ico +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.css +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/beemaster/beemaster.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/beemaster/index.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/css/gina.min.css +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.br +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/css/gina.min.css.gz +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/html/statusbar.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.br +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/html/statusbar.html.gz +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/inspector/have_heart_one-webfont.woff2 +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/inspector/index.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/inspector/inspector.css +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/inspector/inspector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/inspector/logo.svg +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.br +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/asset/plugin/dist/vendor/gina/js/gina.onload.min.js.gz +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/config.requirements-anchor.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/ai/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/ai/lib/connector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/connector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/connector.v3.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/connector.v4.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/n1ql.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/session-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/session-store.v3.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/session-store.v4.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/couchbase/lib/storage-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/duckdb/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/duckdb/lib/connector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mongodb/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mongodb/lib/connector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mongodb/lib/job-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mongodb/lib/pipeline-loader.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mongodb/lib/session-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mysql/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/mysql/lib/connector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/param-redact.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/postgresql/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/postgresql/lib/connector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/redis/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/redis/lib/connector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/redis/lib/job-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/redis/lib/kv-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/redis/lib/render-cache-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/redis/lib/session-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/scylladb/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/scylladb/lib/connector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/scylladb/lib/session-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/settle-once.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/sql-parser.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/sqlite/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/sqlite/lib/connector.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/sqlite/lib/job-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/sqlite/lib/kv-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/connectors/sqlite/lib/session-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/content.encoding +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.framework.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-nunjucks-async.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-stream.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-v1.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/controller.render-xml.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/inline-script.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/inspector-window-emit.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/preload-hints.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/controller/release-banner.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/dev/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/dev/lib/class.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/dev/lib/factory.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/dev/lib/tools.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/locales/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/locales/currency.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/locales/dist/language/en.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/locales/dist/language/fr.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/locales/dist/region/en.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/locales/dist/region/fr.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/locales/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/mime.types +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/model/entity.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/model/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/model/template/entityFactory.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/model/template/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/csrf/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/csrf/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/csrf/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/coep/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/coep/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/coep/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/coop/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/coop/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/coop/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/corp/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/corp/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/corp/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/csp/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/csp/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/csp/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/hide-powered-by/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/hide-powered-by/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/hide-powered-by/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/hsts/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/hsts/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/hsts/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/origin-agent-cluster/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/origin-agent-cluster/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/origin-agent-cluster/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/referrer-policy/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/referrer-policy/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/referrer-policy/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-content-type-options/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-content-type-options/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-content-type-options/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-dns-prefetch-control/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-dns-prefetch-control/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-dns-prefetch-control/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-download-options/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-download-options/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-download-options/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-frame-options/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-frame-options/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-frame-options/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-permitted-cross-domain-policies/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-xss-protection/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-xss-protection/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/security-headers/x-xss-protection/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/session/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/session/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/session/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/storage/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/storage/build.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/storage/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/storage/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/validator/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/validator/build.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/plugins/lib/validator/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/server.isaac.rapid-reset.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/server.route-candidates.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/status.codes +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/_gitignore +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/app.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/connectors.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/routing.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/settings.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/settings.server.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/templates.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/config/watchers.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/controllers/controller.content.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/controllers/controller.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/controllers/setup.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle/locales/en.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_namespace/controllers/controller.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/css/default.css +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/css/home.css +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/css/vendor/readme.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/favicon.ico +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/js/components/x-checklist.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/js/vendor/readme.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/manifest.webmanifest +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/readme.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_public/sw.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_templates/handlers/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_templates/html/content/homepage.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_templates/html/includes/error-msg-noscript.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_templates/html/includes/error-msg-outdated-browser.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_templates/html/includes/x-checklist.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/boilerplate/bundle_templates/html/layouts/main.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/command/gina.bat.tpl +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/command/gina.tpl +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/conf/env.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/conf/manifest.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/conf/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/conf/settings.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/conf/statics.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/conf/templates.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/error/client/json/401.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/error/client/json/403.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/error/client/json/404.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/error/server/html/50x.html +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/error/server/json/500.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/error/server/json/503.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/core/template/extensions/logger/config.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/console.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/data/LICENSE +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/data/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/data/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/dateFormat.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/json/LICENSE +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/json/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/json/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/json/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/path.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/plugins/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/plugins/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/plugins/src/api-error.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/plugins/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/task.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/helpers/text.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/admin/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/admin/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/archiver/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/archiver/build.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/archiver/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/archiver/src/dep/jszip.min.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/archiver/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/async/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/async/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/audit/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/audit/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/audit-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/authn/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/authn/src/lockout.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/authn/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/authn/src/totp.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/authz-gate/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/authz-gate/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cache/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cache/build.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cache/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cache/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/aliases.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/audit/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/audit/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/audit/verify.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/add.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/build.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/copy.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/cp.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/inc/boot-lines.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/inc/name-rewrite.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/inc/name.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/man.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/mcp-start.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/mcp.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/oas.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/openapi.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/remove.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/rename.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/rm.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/status.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/stop.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/bundle/types.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/cache/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/cache/stats.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/add.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/infer.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/migrate.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/models.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/remove.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/rm.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/connector/test.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/container/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/container/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/container/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/container/man.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/container/ps.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/container/stop.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/add.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/inc/args.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/inc/namespace.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/inc/reference-rewrite.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/inc/reference-scan.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/inc/scaffold.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/remove.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/rename.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/controller/rm.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/add.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/get.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/inc/name.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/link-dev.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/remove.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/rm.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/set.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/unset.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/env/use.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/add.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/build.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/dot.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/get.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/inc/listen-error.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/link-node-modules.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/link.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/man.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/msg.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/open.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/remove.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/reset.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/set.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/start.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/tail.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/update.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/framework/version.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/gina-dev.1.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/gina-framework.1.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/gina.1.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/add.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/export.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/import.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/i18n/scan.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/_host.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/build.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/man.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/image/rm.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/inspector/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/inspector/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/inspector/open.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/man-render.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/minion/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/minion/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/minion/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/minion/kill.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/minion/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/msg.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/port/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/port/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/port/inc/scan.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/port/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/port/reset.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/port/set.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/add.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/backup.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/build.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/import.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/inc/name.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/man.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/move.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/remove.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/rename.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/restart.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/restore.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/rm.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/start.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/status.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/project/stop.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/protocol/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/protocol/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/protocol/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/protocol/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/protocol/remove.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/protocol/set.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/add.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/inc/name.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/link-local.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/link-production.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/remove.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/rm.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/scope/use.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/secrets/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/secrets/check.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/secrets/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/secrets/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/secrets/scan.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/service/help.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/service/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/service/list.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/service/man.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/service/start.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/storage/arguments.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/storage/gc.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/storage/help.txt +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/storage/stats.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/storage/verify.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd/view/add.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd-status-format/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cmd-status-format/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/collection/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/collection/build.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/collection/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/conf-view/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/conf-view/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/config.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/connector-config/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/connector-config/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/connector-error/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/connector-error/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/connector-registry/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/connector-registry/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cron/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cron/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/cron/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/domain/LICENSE +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/domain/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/domain/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/domain/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/dto/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/dto/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/dto-pipe/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/dto-pipe/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/dto-types/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/dto-types/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/duration/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/duration/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/error-ref/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/error-ref/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/generator/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/i18n/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/i18n/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/idempotency/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/idempotency/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/image-build/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/image-build/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/inherits/LICENSE +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/inherits/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/inherits/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/inherits/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/inspector-events/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/inspector-events/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/inspector-redact/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/inspector-redact/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/instrument/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/instrument/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/job/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/job-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/json-config-header/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/json-config-header/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/kv/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/kv/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/kv-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/lane/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/loading-state/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/loading-state/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/logger/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/logger/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/containers/default/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/containers/file/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/containers/mq/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/containers/mq/listener.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/containers/mq/speaker.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/logger/src/helper.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/maintenance/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/maintenance/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/math/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/mcp-dispatch/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/mcp-dispatch/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/mcp-http/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/mcp-http/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/mcp-server/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/mcp-server/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/merge/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/merge/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/merge/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/message-validator/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/message-validator/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/metrics/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/metrics/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/model.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/money/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/money/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/multipart/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/multipart/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/net-locality/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/net-locality/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/nunjucks-filters/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/nunjucks-filters/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/nunjucks-resolver/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/nunjucks-resolver/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/priority/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/priority/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/push/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/push/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/rate-limit/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/rate-limit/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/release-watch/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/release-watch/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/render-cache/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/render-cache-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/routing/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/routing/build.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/routing/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/routing-introspect/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/routing-introspect/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/backends/env.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/backends/exec.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/backends/file.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/declaration.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/env-file.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/secrets/src/sources.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/security-headers-emitter/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/security-headers-emitter/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/session-lifetime/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/session-lifetime/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/session-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/shell.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/sri/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/sri/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/state.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/storage/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/local-cas.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/local-stream.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/local.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/meta-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/s3.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/storage/src/util.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/storage-store.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/swig-filters/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/swig-filters/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/swig-resolver/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/swig-resolver/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/template-loaders/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/template-loaders/src/loaders/http.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/template-loaders/src/loaders/memory.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/template-loaders/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/url/README.md +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/url/index.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/url/routing.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/uuid/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/uuid/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/validator.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/watcher/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/watcher/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/ws-framing/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/ws-framing/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/ws-query/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/ws-query/src/main.js +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/ws-session/package.json +0 -0
- /package/framework/{v0.7.3 → v0.7.4}/lib/ws-session/src/main.js +0 -0
|
@@ -25,6 +25,29 @@
|
|
|
25
25
|
* defined). An explicitly empty `{}` filter is legal and matches every
|
|
26
26
|
* record; `null` is a legal needle comparing strictly against stored values.
|
|
27
27
|
*
|
|
28
|
+
* A key holding a dot is a property path (`'address.city'`), also inside an
|
|
29
|
+
* array of objects (`'reviews[*].ratings.score'`). A dotted key that is not a
|
|
30
|
+
* property path matches nothing.
|
|
31
|
+
*
|
|
32
|
+
* Query results (`find`, `orderBy`, `limit`, `notIn`, …) are Arrays carrying
|
|
33
|
+
* these methods, so calls chain. Their `filter` takes either a function, which
|
|
34
|
+
* filters like `Array.prototype.filter` and returns a chainable result, or a
|
|
35
|
+
* field name or a list of field names, which projects each row onto those
|
|
36
|
+
* fields and returns a plain array.
|
|
37
|
+
*
|
|
38
|
+
* Search options. `setSearchOption(field, 'isCaseSensitive', false)` makes the
|
|
39
|
+
* next search compare `field` without regard to case. It applies to that one
|
|
40
|
+
* call (`find`, `findOne`, `update`, `replace`, `delete`, …) and is then
|
|
41
|
+
* cleared. The value is matched as TEXT, whole: a dot, a parenthesis or any
|
|
42
|
+
* other character means itself.
|
|
43
|
+
*
|
|
44
|
+
* Two things read a value as something other than text, with or without a
|
|
45
|
+
* search option: a value holding `<`, `>` or `=` is a comparison (`'>= 1'`),
|
|
46
|
+
* and the value `not null`, in any case, matches every defined, non-null
|
|
47
|
+
* value. `{ searchOptionRules: { skipEval: true } }`, passed to the
|
|
48
|
+
* constructor, turns the comparison off for the plain (non-dotted) keys of
|
|
49
|
+
* that Collection; it changes neither `not null` nor a dotted key.
|
|
50
|
+
*
|
|
28
51
|
* @class Collection
|
|
29
52
|
* @constructor
|
|
30
53
|
* @this {Collection}
|
|
@@ -33,6 +56,7 @@
|
|
|
33
56
|
* @param {object} [options] - Options
|
|
34
57
|
* @param {boolean} [options.useLocalStorage=false] - Persist to `localStorage` (browser only)
|
|
35
58
|
* @param {string} [options.locale='en'] - Locale used for string comparison
|
|
59
|
+
* @param {object} [options.searchOptionRules] - Overrides of the search-option rule table: `skipEval` (boolean, default `false`), and the `re` template and `modifiers` flags of an `isCaseSensitive` entry (`false` or `true`). In a template `%s` stands for the filter value, which is always matched as text: `{ isCaseSensitive: { false: { re: '^%s', modifiers: 'i' } } }` makes the case-insensitive search a prefix search
|
|
36
60
|
* @returns {object} Collection instance (the enriched `content` array)
|
|
37
61
|
* @throws {Error} When `content` is not an Array
|
|
38
62
|
*
|
|
@@ -57,6 +81,14 @@
|
|
|
57
81
|
* col.delete({ id: 2 });
|
|
58
82
|
* col.orderBy({ name: 'asc' });
|
|
59
83
|
* col.toRaw(); // strip _uuid/_hasItsOwnUuid
|
|
84
|
+
* col.find({}).filter(function (r) { return r.id > 1; }); // chainable: .toRaw(), .orderBy(), …
|
|
85
|
+
* col.find({}).filter(['id', 'name']); // projection: [{ id, name }, …]
|
|
86
|
+
*
|
|
87
|
+
* // search option — the next search ignores the case of `name`; the value is text
|
|
88
|
+
* col.setSearchOption('name', 'isCaseSensitive', false).findOne({ name: 'ALICE' }); // { id:1, name:'Alice' }
|
|
89
|
+
* col.setSearchOption('name', 'isCaseSensitive', false).find({ name: 'a.' }); // [] — the dot is a dot
|
|
90
|
+
* // the same option as one object, keyed by field
|
|
91
|
+
* col.setSearchOption({ name: { isCaseSensitive: false } }).findOne({ name: 'BOB' }); // { id:2, name:'Bob' }
|
|
60
92
|
*/
|
|
61
93
|
function Collection(content, options) {
|
|
62
94
|
|
|
@@ -137,6 +169,35 @@ function Collection(content, options) {
|
|
|
137
169
|
if (/^"(?:\\.|[^"\\])*"$/.test(right)) { right = JSON.parse(right); }
|
|
138
170
|
return JSON.stringify(String(left)) + op + JSON.stringify(right);
|
|
139
171
|
};
|
|
172
|
+
// #B818 — every character a RegExp reads as syntax outside a character class.
|
|
173
|
+
var REGEXP_SYNTAX_RE = /[\\^$.*+?()[\]{}|]/g;
|
|
174
|
+
/**
|
|
175
|
+
* Build the RegExp of one search-option rule for one filter value (#B818, #B819).
|
|
176
|
+
*
|
|
177
|
+
* The rule's `re` is a template in which `%s` stands for the value. The
|
|
178
|
+
* template is the pattern; the value is TEXT: every character a RegExp reads
|
|
179
|
+
* as syntax is escaped before the value takes the place of `%s`, and a
|
|
180
|
+
* function replacer puts it there, so a `$` sequence in the value (`$&`,
|
|
181
|
+
* `$$`, …) is not expanded. The pattern is built in a local and the rule
|
|
182
|
+
* entry is only read: the next value — on this instance, or on another one
|
|
183
|
+
* sharing the caller's rule table — starts from the same template.
|
|
184
|
+
*
|
|
185
|
+
* @inner
|
|
186
|
+
* @private
|
|
187
|
+
* @param {object} ruleDef - A rule entry of the search-option rule table
|
|
188
|
+
* @param {string} ruleDef.re - The template, e.g. `'^%s$'`
|
|
189
|
+
* @param {string} [ruleDef.modifiers] - RegExp flags, e.g. `'i'`
|
|
190
|
+
* @param {*} value - The filter value; read as a string
|
|
191
|
+
* @returns {RegExp} the expression matching `value` as text inside the template
|
|
192
|
+
*
|
|
193
|
+
* @example
|
|
194
|
+
* buildSearchOptionRegExp({ re: '^%s$', modifiers: 'i' }, 'a.b'); // /^a\.b$/i
|
|
195
|
+
*/
|
|
196
|
+
var buildSearchOptionRegExp = function(ruleDef, value) {
|
|
197
|
+
var text = String(value).replace(REGEXP_SYNTAX_RE, '\\$&');
|
|
198
|
+
var pattern = ruleDef.re.replace(/\%s/, function onValue() { return text; });
|
|
199
|
+
return (ruleDef.modifiers) ? new RegExp(pattern, ruleDef.modifiers) : new RegExp(pattern);
|
|
200
|
+
};
|
|
140
201
|
var tryEval = function(condition) {
|
|
141
202
|
var m = (typeof(condition) == 'string') ? condition.match(CONDITION_RE) : null;
|
|
142
203
|
if (!m) {
|
|
@@ -202,28 +263,40 @@ function Collection(content, options) {
|
|
|
202
263
|
/**
|
|
203
264
|
* Set local search option for the current collection method call
|
|
204
265
|
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
* .setSearchOption('city', 'isCaseSensitive', false)
|
|
209
|
-
* .find({ city: 'cap Town' });
|
|
266
|
+
* The option applies to the next search only (`find`, `findOne`, `update`,
|
|
267
|
+
* `replace`, `delete`, …) and is then cleared. The value of that search is
|
|
268
|
+
* matched as text: a pattern character in it means itself (#B818).
|
|
210
269
|
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
* .setSearchOption(searchOptions)
|
|
220
|
-
* .find({ city: 'cap Town' }); *
|
|
270
|
+
* Two forms. Three arguments set one rule on one field and ADD to what an
|
|
271
|
+
* earlier call set, so calls chain per field. One object, keyed by field,
|
|
272
|
+
* REPLACES what was set: `{ <field>: { <rule>: <value> } }` (#B820). The
|
|
273
|
+
* object is copied: it is neither kept nor changed. The only rule is
|
|
274
|
+
* `isCaseSensitive` (`true` or `false`; the texts `'true'` / `'false'` are
|
|
275
|
+
* read as booleans). `skipEval` is a constructor option
|
|
276
|
+
* (`options.searchOptionRules`): as a top-level key of the object it is
|
|
277
|
+
* accepted and has no effect.
|
|
221
278
|
*
|
|
222
|
-
* @param {object|string} searchOptionObject or searchOptionTargetedProperty
|
|
223
|
-
* @param {string} [searchRule]
|
|
224
|
-
* @param {boolean} [searchRuleValue] -
|
|
279
|
+
* @param {object|string} searchOptionObject or searchOptionTargetedProperty - the options keyed by field, or the field name
|
|
280
|
+
* @param {string} [searchRule] - the rule name (three-argument form)
|
|
281
|
+
* @param {boolean} [searchRuleValue] - the rule's value: `false` ignores the case, `true` keeps it
|
|
225
282
|
*
|
|
226
283
|
* @returns {object} instance with local search options
|
|
284
|
+
* @throws {Error} on zero, two or more than three arguments
|
|
285
|
+
* @throws {Error} when a single argument is not an object
|
|
286
|
+
* @throws {Error} `<rule> is not an allowed searchOption !` on an unknown rule name
|
|
287
|
+
* @throws {Error} when a field's entry in the object form is not an object of rules
|
|
288
|
+
*
|
|
289
|
+
* @example
|
|
290
|
+
* // three arguments: one rule on one field
|
|
291
|
+
* var rec = new Collection(rows)
|
|
292
|
+
* .setSearchOption('city', 'isCaseSensitive', false)
|
|
293
|
+
* .find({ city: 'cap Town' });
|
|
294
|
+
*
|
|
295
|
+
* @example
|
|
296
|
+
* // one object, keyed by field
|
|
297
|
+
* var rec = new Collection(rows)
|
|
298
|
+
* .setSearchOption({ city: { isCaseSensitive: false }, country: { isCaseSensitive: false } })
|
|
299
|
+
* .find({ city: 'cap Town', country: 'south africa' });
|
|
227
300
|
*/
|
|
228
301
|
instance['setSearchOption'] = function() {
|
|
229
302
|
|
|
@@ -241,12 +314,41 @@ function Collection(content, options) {
|
|
|
241
314
|
if ( typeof(arguments[0]) != 'object' )
|
|
242
315
|
throw new Error('searchOption must be an object');
|
|
243
316
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
317
|
+
// #B820 — the object form is keyed by FIELD: { <field>: { <rule>: <value> } }.
|
|
318
|
+
// The loop below tested each top-level key — a field name — against the
|
|
319
|
+
// rule table, so the documented shape threw, with a message read from the
|
|
320
|
+
// second argument, which this form does not have. Each field's rule names
|
|
321
|
+
// are now tested instead, and the options are COPIED: the caller's object
|
|
322
|
+
// is neither kept nor changed by the search. A top-level key that names a
|
|
323
|
+
// rule is accepted and has no effect, as before.
|
|
324
|
+
// for (var prop in arguments[0]) {
|
|
325
|
+
// if ( typeof(searchOptionRules[prop]) == 'undefined' )
|
|
326
|
+
// throw new Error(arguments[1] + ' is not an allowed searchOption !');
|
|
327
|
+
// }
|
|
328
|
+
//
|
|
329
|
+
// localSearchOptions = arguments[0];
|
|
330
|
+
var given = arguments[0], normalized = {};
|
|
331
|
+
for (var prop in given) {
|
|
332
|
+
if ( typeof(searchOptionRules[prop]) != 'undefined' )
|
|
333
|
+
continue;
|
|
334
|
+
|
|
335
|
+
if ( !given[prop] || typeof(given[prop]) != 'object' || Array.isArray(given[prop]) )
|
|
336
|
+
throw new Error('searchOption `' + prop + '` must be an object of rules, e.g. { isCaseSensitive: false }');
|
|
337
|
+
|
|
338
|
+
normalized[prop] = {};
|
|
339
|
+
for (var ruleName in given[prop]) {
|
|
340
|
+
if ( typeof(searchOptionRules[ruleName]) == 'undefined' )
|
|
341
|
+
throw new Error(ruleName + ' is not an allowed searchOption !');
|
|
342
|
+
|
|
343
|
+
if ( /true|false/i.test(given[prop][ruleName]) ) {
|
|
344
|
+
normalized[prop][ruleName] = /true/i.test(given[prop][ruleName]) ? true : false
|
|
345
|
+
} else {
|
|
346
|
+
normalized[prop][ruleName] = given[prop][ruleName]
|
|
347
|
+
}
|
|
348
|
+
}
|
|
247
349
|
}
|
|
248
350
|
|
|
249
|
-
localSearchOptions =
|
|
351
|
+
localSearchOptions = normalized;
|
|
250
352
|
} else {
|
|
251
353
|
|
|
252
354
|
if ( !localSearchOptions )
|
|
@@ -275,7 +377,8 @@ function Collection(content, options) {
|
|
|
275
377
|
* find
|
|
276
378
|
*
|
|
277
379
|
* Filters the collection content with one or more filter objects.
|
|
278
|
-
* Passing more than one filter object acts as an OR clause
|
|
380
|
+
* Passing more than one filter object acts as an OR clause: a row is listed
|
|
381
|
+
* once, in collection order, whatever the number of filters it matches (#B827).
|
|
279
382
|
*
|
|
280
383
|
* Every filter value must be DEFINED. A key whose value is `undefined`
|
|
281
384
|
* makes the whole call throw an Error naming the offending key: the JSON
|
|
@@ -289,6 +392,11 @@ function Collection(content, options) {
|
|
|
289
392
|
* @param {boolean} [withOrClause] - trailing boolean, forces OR mode
|
|
290
393
|
* @throws {Error} when any filter key's value is `undefined`
|
|
291
394
|
* @returns {array} result - decorated result set (chainable)
|
|
395
|
+
*
|
|
396
|
+
* @example
|
|
397
|
+
* var col = new Collection([{ name: 'a', g: 'x' }, { name: 'b', g: 'x' }, { name: 'c', g: 'y' }]);
|
|
398
|
+
* col.find({ g: 'x' }); // rows `a` and `b`
|
|
399
|
+
* col.find({ name: 'a' }, { g: 'x' }); // rows `a` and `b` too: `a` matches both filters and is listed once
|
|
292
400
|
*/
|
|
293
401
|
instance['find'] = function() {
|
|
294
402
|
// reset
|
|
@@ -463,13 +571,22 @@ function Collection(content, options) {
|
|
|
463
571
|
continue
|
|
464
572
|
}
|
|
465
573
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
574
|
+
// #B818 / #B819 — the value is matched as TEXT and the rule table is
|
|
575
|
+
// only read. The statements below spliced the raw value into the
|
|
576
|
+
// rule's template with a string replacer and ASSIGNED the result to
|
|
577
|
+
// the rule entry: a value holding a pattern character was compiled
|
|
578
|
+
// as a pattern (it threw out of the search, or matched other rows),
|
|
579
|
+
// a `$` sequence in a value was expanded, and the entry kept the
|
|
580
|
+
// FIRST value, so every later option search on the instance — or on
|
|
581
|
+
// any instance sharing the caller's rule table — matched that value.
|
|
582
|
+
// searchOptionRules[rule][searchOptions[field][rule]].re = searchOptionRules[rule][searchOptions[field][rule]].re.replace(/\%s/, filter);
|
|
583
|
+
//
|
|
584
|
+
// if (searchOptionRules[rule][searchOptions[field][rule]].modifiers) {
|
|
585
|
+
// re = new RegExp(searchOptionRules[rule][searchOptions[field][rule]].re, searchOptionRules[rule][searchOptions[field][rule]].modifiers);
|
|
586
|
+
// } else {
|
|
587
|
+
// re = new RegExp(searchOptionRules[rule][searchOptions[field][rule]].re);
|
|
588
|
+
// }
|
|
589
|
+
re = buildSearchOptionRegExp(searchOptionRules[rule][searchOptions[field][rule]], filter);
|
|
473
590
|
|
|
474
591
|
if ( re.test(_content) ) {
|
|
475
592
|
++reValidCount
|
|
@@ -486,11 +603,33 @@ function Collection(content, options) {
|
|
|
486
603
|
};
|
|
487
604
|
}
|
|
488
605
|
|
|
606
|
+
/**
|
|
607
|
+
* Search on a dotted key: walk `f` as a property path of `_content`
|
|
608
|
+
* and compare the value found there with `filter`.
|
|
609
|
+
*
|
|
610
|
+
* `f` must be a property path (`a.b.c`, identifiers separated by
|
|
611
|
+
* dots). Any other dotted key matches nothing: the path check below
|
|
612
|
+
* refuses it and no value is read.
|
|
613
|
+
*
|
|
614
|
+
* @inner
|
|
615
|
+
* @private
|
|
616
|
+
* @param {*} filter - The filter value, or a comparison (`'>= 4'`)
|
|
617
|
+
* @param {string} f - The dotted key
|
|
618
|
+
* @param {object} _content - The row, or the element of a `[*]` array
|
|
619
|
+
* @param {number} matched - The conditions matched so far
|
|
620
|
+
* @returns {{matched: number}} `matched`, plus one when the value matches
|
|
621
|
+
*/
|
|
489
622
|
var searchThroughProp = function(filter, f, _content, matched) {
|
|
490
623
|
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
re
|
|
624
|
+
// #B821 — dead code that could only throw. The expression was built
|
|
625
|
+
// from the last segment of the filter KEY and never read (the only
|
|
626
|
+
// read of `re` follows its own assignment, in the search-option
|
|
627
|
+
// branch above), so a key holding `(`, `)` or `[` threw a
|
|
628
|
+
// SyntaxError out of the search, before the path check below could
|
|
629
|
+
// refuse the key like any other dotted key that is not a path.
|
|
630
|
+
// var field = f.split(/\./g);
|
|
631
|
+
// field = field[field.length - 1];
|
|
632
|
+
// re = new RegExp('("' + field + '":\\w+)');
|
|
494
633
|
|
|
495
634
|
var value = null;
|
|
496
635
|
|
|
@@ -662,29 +801,14 @@ function Collection(content, options) {
|
|
|
662
801
|
}
|
|
663
802
|
|
|
664
803
|
if (matched == condition ) { // all conditions must be fulfilled to match
|
|
665
|
-
//
|
|
666
|
-
//
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
) {
|
|
674
|
-
//console.debug('searchIndex ', searchIndex);
|
|
675
|
-
if (!withOrClause || withOrClause && result.indexOf(tmpContent[o]._uuid) < 0 || notInSearchModeEnabled) {
|
|
676
|
-
result[i] = tmpContent[o];
|
|
677
|
-
++i;
|
|
678
|
-
}
|
|
679
|
-
} else if (
|
|
680
|
-
withOrClause
|
|
681
|
-
&& !notInSearchModeEnabled
|
|
682
|
-
) {
|
|
683
|
-
if (result.indexOf(tmpContent[o]._uuid) < 0) {
|
|
684
|
-
result[i] = tmpContent[o];
|
|
685
|
-
++i;
|
|
686
|
-
}
|
|
687
|
-
}
|
|
804
|
+
// #B827 — a row is listed ONCE, whatever the number of filter objects
|
|
805
|
+
// it matches; the remaining filters are not read for it. The guards that
|
|
806
|
+
// stood here looked a `_uuid` STRING up in an array of ROWS, so they
|
|
807
|
+
// never skipped anything: a row matching two filters of an OR call was
|
|
808
|
+
// listed twice, and a limited result then lost a real row.
|
|
809
|
+
result[i] = tmpContent[o];
|
|
810
|
+
++i;
|
|
811
|
+
break;
|
|
688
812
|
}
|
|
689
813
|
|
|
690
814
|
}
|
|
@@ -850,10 +974,24 @@ function Collection(content, options) {
|
|
|
850
974
|
* of the resultset :
|
|
851
975
|
* .notIn(filter, false) where false must be a real boolean
|
|
852
976
|
*
|
|
853
|
-
*
|
|
977
|
+
* #B826 — with a filter object the found rows ARE rows of the searched
|
|
978
|
+
* array. When no `key` is named and every found row is one, each is taken
|
|
979
|
+
* out as itself and no comparison key is read: rows carrying neither a
|
|
980
|
+
* `_uuid` nor an `id` (after `toRaw()` or `update()`) are no longer refused,
|
|
981
|
+
* and rows sharing an `id` no longer lose the wrong one. A named `key`, and
|
|
982
|
+
* rows that come from elsewhere (the array form), are compared by key as
|
|
983
|
+
* before: such rows must carry the named key, a `_uuid` or an `id`.
|
|
854
984
|
*
|
|
855
985
|
* @param {object|array} filters|arrayToFilter - works like find filterss
|
|
856
986
|
* @param {string} [key] - unique id for comparison; faster when provided
|
|
987
|
+
* @returns {array} result - a copy of the searched rows without the rows found (chainable)
|
|
988
|
+
* @throws {Error} when rows from elsewhere share no usable comparison key
|
|
989
|
+
*
|
|
990
|
+
* @example
|
|
991
|
+
* var col = new Collection([{ name: 'a' }, { name: 'b' }]);
|
|
992
|
+
* col.toRaw(); // strips the internal `_uuid` of the rows
|
|
993
|
+
* col.notIn({ name: 'b' }); // [{ name: 'a' }]
|
|
994
|
+
* col.notIn([{ name: 'b' }], 'name'); // rows from elsewhere: compared by the named key
|
|
857
995
|
*/
|
|
858
996
|
instance['notIn'] = function(){
|
|
859
997
|
|
|
@@ -897,8 +1035,36 @@ function Collection(content, options) {
|
|
|
897
1035
|
notInSearchModeEnabled = false;
|
|
898
1036
|
}
|
|
899
1037
|
|
|
1038
|
+
// #B826 — identity first. With a filter object the found rows ARE rows of
|
|
1039
|
+
// the searched array, so each one is taken out of the clone at its own
|
|
1040
|
+
// place and no comparison key is read: rows carrying neither `_uuid` nor
|
|
1041
|
+
// `id` no longer throw, and rows sharing an `id` no longer lose the wrong
|
|
1042
|
+
// one. A key the caller named, and rows that come from elsewhere, keep
|
|
1043
|
+
// the key comparison below.
|
|
1044
|
+
var source = ( Array.isArray(this) ) ? this : content
|
|
1045
|
+
, byIdentity = false
|
|
1046
|
+
, s = 0
|
|
1047
|
+
, sLen = foundResults.length
|
|
1048
|
+
;
|
|
1049
|
+
if ( !key && sLen > 0 ) {
|
|
1050
|
+
byIdentity = true;
|
|
1051
|
+
for (; s < sLen; ++s) {
|
|
1052
|
+
if ( source.indexOf(foundResults[s]) < 0 ) {
|
|
1053
|
+
byIdentity = false;
|
|
1054
|
+
break;
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
900
1058
|
|
|
901
|
-
if (
|
|
1059
|
+
if (byIdentity) {
|
|
1060
|
+
// `currentResult` is the clone of `source`, row for row: going
|
|
1061
|
+
// backwards keeps the places still to visit aligned
|
|
1062
|
+
for (s = source.length - 1; s > -1; --s) {
|
|
1063
|
+
if ( foundResults.indexOf(source[s]) > -1 ) {
|
|
1064
|
+
currentResult.splice(s, 1);
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
} else if (foundResults.length > 0) {
|
|
902
1068
|
|
|
903
1069
|
// check key
|
|
904
1070
|
if (
|
|
@@ -1043,15 +1209,42 @@ function Collection(content, options) {
|
|
|
1043
1209
|
}
|
|
1044
1210
|
|
|
1045
1211
|
/**
|
|
1046
|
-
*
|
|
1212
|
+
* Merges `set` into every entry `filter` matches, then writes each merged
|
|
1213
|
+
* entry back over the entry it came from. Unlike `.replace()`, the entry's
|
|
1214
|
+
* other fields are kept: `set` wins on the fields it names.
|
|
1047
1215
|
*
|
|
1048
|
-
*
|
|
1049
|
-
*
|
|
1216
|
+
* Each matched entry goes back to its own place: the stored entry itself
|
|
1217
|
+
* when the matched entry is one (the collection, and a chained result,
|
|
1218
|
+
* hand `update()` their own entries), otherwise the stored entry that
|
|
1219
|
+
* shares a key with it — `key` when given, else the internal `_uuid` when
|
|
1220
|
+
* both carry one, else `id` when both do. A key that one of the two lacks
|
|
1221
|
+
* never matches. An entry matched by two filter objects is written once.
|
|
1222
|
+
*
|
|
1223
|
+
* N.B. an updated entry loses the internal `_uuid` the collection gave it,
|
|
1224
|
+
* while the entries left alone keep theirs. Persist `.toRaw()` rather than
|
|
1225
|
+
* the chained array if the data is going to be re-loaded into a new
|
|
1226
|
+
* Collection later.
|
|
1227
|
+
*
|
|
1228
|
+
* @param {object|Array} filter - Entry selector, as `.find()` — or an already-found result
|
|
1229
|
+
* @param {object} set - The fields to merge into each matched entry
|
|
1230
|
+
* @param {string} [key] - Comparison key for a matched entry that is not a stored one; compared as given
|
|
1231
|
+
* @returns {Array} the chainable result set
|
|
1232
|
+
*
|
|
1233
|
+
* @throws {Error} when `filter` or `set` is missing, or a filter value is `undefined`
|
|
1234
|
+
*
|
|
1235
|
+
* @example
|
|
1236
|
+
* // every matched entry, each in its own place
|
|
1237
|
+
* col.update({ status: 'draft' }, { status: 'sent' });
|
|
1050
1238
|
*
|
|
1051
|
-
* @
|
|
1239
|
+
* @example
|
|
1240
|
+
* // on a chained result
|
|
1241
|
+
* col.find({ type: 'invoice' }).update({ status: 'draft' }, { status: 'sent' }).toRaw();
|
|
1052
1242
|
*/
|
|
1053
1243
|
instance['update'] = function() {
|
|
1054
1244
|
var key = '_uuid' // comparison key is _uuid by default
|
|
1245
|
+
// #B822 — whether the caller named the comparison key. A named key is
|
|
1246
|
+
// compared as given: it is never replaced by `id`.
|
|
1247
|
+
, keyExplicit = false
|
|
1055
1248
|
, result = null
|
|
1056
1249
|
, filters = null
|
|
1057
1250
|
, set = null
|
|
@@ -1061,6 +1254,7 @@ function Collection(content, options) {
|
|
|
1061
1254
|
// comparison key : _uuid by default, but can be set to id
|
|
1062
1255
|
if ( typeof(arguments[arguments.length-1]) == 'string' ) {
|
|
1063
1256
|
key = arguments[arguments.length - 1];
|
|
1257
|
+
keyExplicit = true;
|
|
1064
1258
|
delete arguments[arguments.length - 1];
|
|
1065
1259
|
--arguments.length;
|
|
1066
1260
|
}
|
|
@@ -1100,20 +1294,84 @@ function Collection(content, options) {
|
|
|
1100
1294
|
|
|
1101
1295
|
result = Array.isArray(this) ? this : JSON.clone(content);
|
|
1102
1296
|
if (foundResults.length > 0 ) {
|
|
1103
|
-
|
|
1297
|
+
// #B822 — each matched row is written back over the row it came from.
|
|
1298
|
+
//
|
|
1299
|
+
// The place used to be found by comparing a key on each stored row
|
|
1300
|
+
// with the same key on the merged row:
|
|
1301
|
+
//
|
|
1302
|
+
// if ( typeof(result[r][key]) == 'undefined' && key == '_uuid' && typeof(result[r]['id']) != 'undefined' ) {
|
|
1303
|
+
// key = 'id';
|
|
1304
|
+
// }
|
|
1305
|
+
// if ( result[r][key] == arr[a][key] ) {
|
|
1306
|
+
// result[r] = arr[a];
|
|
1307
|
+
// break;
|
|
1308
|
+
// }
|
|
1309
|
+
//
|
|
1310
|
+
// On a collection and on a chained result the matched rows ARE stored
|
|
1311
|
+
// rows, and `toRaw()` below strips their `_uuid` in place. Rows with
|
|
1312
|
+
// no `id` then compared `undefined == undefined`: every matched row
|
|
1313
|
+
// went over the FIRST stripped row (a row lost, another written
|
|
1314
|
+
// twice, the rest not updated), and so did a single row once an
|
|
1315
|
+
// earlier update() or toRaw() had stripped a row before it. `key`,
|
|
1316
|
+
// once switched to `id`, stayed `id` for every later row, and a row
|
|
1317
|
+
// found through another collection matched nothing.
|
|
1318
|
+
//
|
|
1319
|
+
// The place is now the stored row itself when the matched row is one
|
|
1320
|
+
// (identity); otherwise the stored row that shares a key with it —
|
|
1321
|
+
// `key` when the caller named one, else `_uuid` when both rows carry
|
|
1322
|
+
// one, else `id` when both do — never a key one of the two lacks. A
|
|
1323
|
+
// place this call already wrote is not written again, and a row
|
|
1324
|
+
// matched twice (by two filter objects) is written once.
|
|
1325
|
+
var found = Array.prototype.slice.call(foundResults) // the matched rows themselves, before any place is written
|
|
1326
|
+
, written = [] // the places this call has written
|
|
1327
|
+
, arr = foundResults.toRaw()
|
|
1328
|
+
, slot = -1
|
|
1329
|
+
, cmpKey = null
|
|
1330
|
+
;
|
|
1104
1331
|
for (var a = 0, aLen = arr.length; a < aLen; ++a) {
|
|
1332
|
+
if ( found.indexOf(found[a]) < a ) continue; // matched twice: written once
|
|
1333
|
+
|
|
1105
1334
|
arr[a] = merge(JSON.clone(set), arr[a]);
|
|
1106
1335
|
// arr[a] = merge(set, arr[a]);
|
|
1336
|
+
|
|
1337
|
+
slot = -1;
|
|
1107
1338
|
for (var r = 0, rLen = result.length; r < rLen; ++r) {
|
|
1108
|
-
if (
|
|
1109
|
-
|
|
1339
|
+
if ( result[r] === found[a] ) {
|
|
1340
|
+
slot = r;
|
|
1341
|
+
break;
|
|
1110
1342
|
}
|
|
1343
|
+
}
|
|
1111
1344
|
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1345
|
+
if ( slot < 0 ) {
|
|
1346
|
+
for (r = 0; r < rLen; ++r) {
|
|
1347
|
+
if ( written.indexOf(r) > -1 ) continue;
|
|
1348
|
+
|
|
1349
|
+
cmpKey = key;
|
|
1350
|
+
if (
|
|
1351
|
+
!keyExplicit
|
|
1352
|
+
&& (
|
|
1353
|
+
typeof(result[r][cmpKey]) == 'undefined'
|
|
1354
|
+
|| typeof(found[a][cmpKey]) == 'undefined'
|
|
1355
|
+
)
|
|
1356
|
+
) {
|
|
1357
|
+
cmpKey = 'id';
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
if (
|
|
1361
|
+
typeof(result[r][cmpKey]) != 'undefined'
|
|
1362
|
+
&& typeof(found[a][cmpKey]) != 'undefined'
|
|
1363
|
+
&& result[r][cmpKey] == found[a][cmpKey]
|
|
1364
|
+
) {
|
|
1365
|
+
slot = r;
|
|
1366
|
+
break;
|
|
1367
|
+
}
|
|
1115
1368
|
}
|
|
1116
1369
|
}
|
|
1370
|
+
|
|
1371
|
+
if ( slot > -1 ) {
|
|
1372
|
+
result[slot] = arr[a];
|
|
1373
|
+
written.push(slot);
|
|
1374
|
+
}
|
|
1117
1375
|
}
|
|
1118
1376
|
}
|
|
1119
1377
|
|
|
@@ -1311,7 +1569,10 @@ function Collection(content, options) {
|
|
|
1311
1569
|
* .delete({ car: 'toyota', color: red }, { car: 'ford' } ) // will delete all `toyota red cars` & all `ford cars`
|
|
1312
1570
|
*
|
|
1313
1571
|
* N.B.: will not affect current result - just returning the DIFF
|
|
1314
|
-
*
|
|
1572
|
+
*
|
|
1573
|
+
* Delegates to `notIn()`: the rows found are taken out as themselves when
|
|
1574
|
+
* no key is named, so a row needs neither a `_uuid` nor an `id` (#B826).
|
|
1575
|
+
*
|
|
1315
1576
|
* @param {object} filter - same as `.find(filter)`
|
|
1316
1577
|
* @param {string|boolean} [ uuid | disabled ] - by default, Collection is using its internal _uuid
|
|
1317
1578
|
* If you want to delete without key comparison, disable `uuid` search mode
|
|
@@ -1669,19 +1930,57 @@ function Collection(content, options) {
|
|
|
1669
1930
|
|
|
1670
1931
|
/**
|
|
1671
1932
|
* filter
|
|
1672
|
-
*
|
|
1673
|
-
*
|
|
1933
|
+
* With a FUNCTION, filters like `Array.prototype.filter`: the callback gets
|
|
1934
|
+
* `(row, index, array)` and `thisArg` as its `this`, and the result is a
|
|
1935
|
+
* `find()`-style result: the matching rows (the same objects) with the methods
|
|
1936
|
+
* `find()` attaches, so `.toRaw()` and the chain keep working.
|
|
1937
|
+
* With a field name or a list of field names, projects each row onto those
|
|
1938
|
+
* fields and returns a plain, deep-cloned array.
|
|
1939
|
+
*
|
|
1940
|
+
* #B517 — a function used to be read as a field name, so `rows.filter(fn)`
|
|
1941
|
+
* matched nothing and returned `[]` with no error.
|
|
1942
|
+
*
|
|
1943
|
+
* @param {function|string|array} filter - a predicate, a field name, or a list of field names
|
|
1944
|
+
* e.g: function (row) { return row.active; }
|
|
1674
1945
|
* e.g: 'id'
|
|
1675
1946
|
* e.g: ['id', 'name']
|
|
1947
|
+
* @param {*} [thisArg] - `this` for the predicate (function form only)
|
|
1948
|
+
*
|
|
1949
|
+
* @returns {array} the matching rows (function form), or rawFilteredResult (projection)
|
|
1950
|
+
* @throws {Error} when `filter` is undefined
|
|
1676
1951
|
*
|
|
1677
|
-
* @
|
|
1952
|
+
* @example
|
|
1953
|
+
* var col = new Collection([{ id: 1, active: true }, { id: 2, active: false }]);
|
|
1954
|
+
* col.find({}).filter(function (row) { return row.active; }).toRaw(); // [{ id: 1, active: true }]
|
|
1955
|
+
* col.find({}).filter('id'); // [{ id: 1 }, { id: 2 }]
|
|
1678
1956
|
* */
|
|
1679
|
-
instance['filter'] = function(filter) {
|
|
1957
|
+
instance['filter'] = function(filter, thisArg) {
|
|
1680
1958
|
|
|
1681
1959
|
if ( typeof(filter) == 'undefined' ) {
|
|
1682
|
-
throw new Error('`filter` parametter must be a string or an array.');
|
|
1960
|
+
// was: throw new Error('`filter` parametter must be a string or an array.');
|
|
1961
|
+
throw new Error('`filter` parameter must be a function, a string or an array.');
|
|
1683
1962
|
}
|
|
1684
1963
|
var result = ( Array.isArray(this) ) ? this : content;
|
|
1964
|
+
|
|
1965
|
+
// #B517 — a function filters like Array.prototype.filter. The projection below
|
|
1966
|
+
// read it as a field name, matched nothing and returned [] with no error. The
|
|
1967
|
+
// result gets the methods find() attaches, so .toRaw() and the chain keep working.
|
|
1968
|
+
if ( typeof(filter) == 'function' ) {
|
|
1969
|
+
var filtered = Array.prototype.filter.call(result, filter, thisArg);
|
|
1970
|
+
filtered.notIn = instance.notIn;
|
|
1971
|
+
filtered.find = instance.find;
|
|
1972
|
+
filtered.update = instance.update;
|
|
1973
|
+
filtered.replace = instance.replace;
|
|
1974
|
+
filtered.or = instance.or;
|
|
1975
|
+
filtered.findOne = instance.findOne;
|
|
1976
|
+
filtered.limit = instance.limit;
|
|
1977
|
+
filtered.orderBy = instance.orderBy;
|
|
1978
|
+
filtered.delete = instance.delete;
|
|
1979
|
+
filtered.toRaw = instance.toRaw;
|
|
1980
|
+
filtered.filter = instance.filter;
|
|
1981
|
+
|
|
1982
|
+
return filtered
|
|
1983
|
+
}
|
|
1685
1984
|
if ( !result.length ) {
|
|
1686
1985
|
return []
|
|
1687
1986
|
}
|