@oracle/oraclejet-audit 10.1.0 → 12.0.0
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/LICENSE.md +1 -1
- package/jaf-amd.js +12 -4
- package/jaf.js +6 -1
- package/jafapi.js +6 -1
- package/lib/AST.js +6 -1
- package/lib/AST_Ts.js +6 -1
- package/lib/AstJson.js +6 -1
- package/lib/AstMd.js +6 -0
- package/lib/AstNodeTypes.js +6 -1
- package/lib/Comments.js +6 -1
- package/lib/ComponentSvcs.js +5 -0
- package/lib/Components.js +6 -1
- package/lib/Config.js +6 -1
- package/lib/ConfigLib.js +6 -1
- package/lib/CssLib.js +5 -0
- package/lib/CssUtils.js +5 -0
- package/lib/DomUtils.js +6 -1
- package/lib/FileIndex.js +5 -0
- package/lib/FileSet.js +5 -0
- package/lib/FsUtils.js +6 -1
- package/lib/Histo.js +6 -0
- package/lib/HtmlTree.js +6 -1
- package/lib/HtmlUtils.js +5 -0
- package/lib/Issue.js +6 -1
- package/lib/JafEvents.js +5 -0
- package/lib/JafLib.js +6 -1
- package/lib/Json.js +6 -0
- package/lib/JsonLoader.js +6 -1
- package/lib/Md.js +6 -0
- package/lib/MetaLib.js +6 -1
- package/lib/NetUtils.js +5 -0
- package/lib/NodeTypes.js +5 -0
- package/lib/Parser.js +6 -1
- package/lib/RegTypes.js +6 -1
- package/lib/Registry.js +6 -1
- package/lib/Reporter.js +6 -1
- package/lib/RuleContext.js +5 -0
- package/lib/RulePack.js +5 -0
- package/lib/RuleSet.js +6 -1
- package/lib/Rules.js +6 -1
- package/lib/Scope.js +6 -1
- package/lib/SemVer.js +5 -0
- package/lib/Server.js +5 -0
- package/lib/SevLib.js +5 -0
- package/lib/Severity.js +6 -1
- package/lib/Stats.js +6 -0
- package/lib/Ts.js +6 -1
- package/lib/Utils.js +6 -1
- package/lib/Watch.js +5 -0
- package/lib/Writer.js +5 -0
- package/lib/ZipUtils.js +5 -0
- package/lib/api.js +6 -0
- package/lib/builtinpacks.js +6 -0
- package/lib/cliStats.js +6 -0
- package/lib/clone.js +6 -1
- package/lib/cmdline.js +6 -1
- package/lib/colors.js +6 -1
- package/lib/defaults.js +6 -0
- package/lib/deflist.js +6 -0
- package/lib/dislist.js +6 -0
- package/lib/exportRules.js +6 -0
- package/lib/extends.js +6 -0
- package/lib/filetypes.js +6 -0
- package/lib/grouplist.js +6 -0
- package/lib/groups.js +6 -0
- package/lib/help.js +6 -1
- package/lib/jetver.js +6 -1
- package/lib/macros.js +6 -0
- package/lib/manual.js +6 -1
- package/lib/metaLoader.js +5 -0
- package/lib/metahist.js +5 -0
- package/lib/msgidLoader.js +6 -1
- package/lib/ns.js +6 -1
- package/lib/nslist.js +5 -0
- package/lib/outFormat.js +6 -0
- package/lib/outfile.js +5 -0
- package/lib/ruleLoader.js +5 -0
- package/lib/scaffold.js +6 -1
- package/lib/scaffoldRule.js +6 -1
- package/lib/schema.js +6 -1
- package/lib/scopewalker.js +6 -0
- package/lib/spinner.js +6 -1
- package/lib/spinnernoop.js +5 -0
- package/lib/tabs.js +5 -0
- package/libext/expparser.js +6 -1
- package/meta/11.0.0/jetauditmeta.js +9 -0
- package/meta/11.1.0/jetauditmeta.js +9 -0
- package/meta/12.0.0/jetauditmeta.js +9 -0
- package/meta/metaverlist.json +1 -1
- package/package.json +72 -69
- package/rulepacks/csp/csp-html-script-unsafe-inline.js +5 -0
- package/rulepacks/csp/csp-html-style-unsafe-inline.js +5 -0
- package/rulepacks/csp/csp-html-unsafe-expr.js +5 -0
- package/rulepacks/csp/csp-js-script-unsafe-eval.js +6 -1
- package/rulepacks/csp/csp-js-style-unsafe-inline.js +5 -0
- package/rulepacks/csp/csp-ts-script-unsafe-eval.js +6 -0
- package/rulepacks/csp/csp-ts-style-unsafe-inline.js +6 -0
- package/rulepacks/csp/msgid.json +6 -1
- package/rulepacks/csp/rules.json +6 -1
- package/rulepacks/jetwc/jetwc-absolute-jetversion.js +6 -1
- package/rulepacks/jetwc/jetwc-aria-redefinition.js +6 -1
- package/rulepacks/jetwc/jetwc-bootstrap.js +6 -1
- package/rulepacks/jetwc/jetwc-compjson-bp-ar.js +6 -1
- package/rulepacks/jetwc/jetwc-compjson-bp-obj.js +6 -1
- package/rulepacks/jetwc/jetwc-component-dependencies.js +6 -1
- package/rulepacks/jetwc/jetwc-component-displayname.js +6 -1
- package/rulepacks/jetwc/jetwc-component-foldername.js +6 -1
- package/rulepacks/jetwc/jetwc-component-location.js +6 -1
- package/rulepacks/jetwc/jetwc-component-type.js +6 -1
- package/rulepacks/jetwc/jetwc-css-oj-complete.js +6 -0
- package/rulepacks/jetwc/jetwc-data-property-prefix.js +6 -1
- package/rulepacks/jetwc/jetwc-deprecated-lifecycle.js +6 -1
- package/rulepacks/jetwc/jetwc-disabled-property.js +6 -1
- package/rulepacks/jetwc/jetwc-displayname.js +6 -1
- package/rulepacks/jetwc/jetwc-dynamic-slot-context.js +6 -1
- package/rulepacks/jetwc/jetwc-dynamic-slots-naming.js +6 -1
- package/rulepacks/jetwc/jetwc-event-displayname.js +6 -1
- package/rulepacks/jetwc/jetwc-events.js +6 -1
- package/rulepacks/jetwc/jetwc-jet-version.js +6 -1
- package/rulepacks/jetwc/jetwc-loader-file.js +6 -1
- package/rulepacks/jetwc/jetwc-markdown-link.js +6 -0
- package/rulepacks/jetwc/jetwc-method-displayname.js +6 -1
- package/rulepacks/jetwc/jetwc-methods.js +6 -1
- package/rulepacks/jetwc/jetwc-namespace.js +6 -1
- package/rulepacks/jetwc/jetwc-nested-defaults.js +6 -1
- package/rulepacks/jetwc/jetwc-nls-languages.js +6 -1
- package/rulepacks/jetwc/jetwc-nls-root.js +6 -1
- package/rulepacks/jetwc/jetwc-oj-register.js +6 -1
- package/rulepacks/jetwc/jetwc-ojcss.js +6 -1
- package/rulepacks/jetwc/jetwc-pack-children.js +6 -1
- package/rulepacks/jetwc/jetwc-packable-components.js +6 -1
- package/rulepacks/jetwc/jetwc-prerelease-dependencies.js +6 -1
- package/rulepacks/jetwc/jetwc-prerelease-pattern.js +6 -1
- package/rulepacks/jetwc/jetwc-prerelease-version.js +6 -1
- package/rulepacks/jetwc/jetwc-property-changed.js +6 -1
- package/rulepacks/jetwc/jetwc-property-displayname.js +6 -1
- package/rulepacks/jetwc/jetwc-property-nesting.js +6 -1
- package/rulepacks/jetwc/jetwc-public-modules.js +6 -1
- package/rulepacks/jetwc/jetwc-register-css.js +6 -1
- package/rulepacks/jetwc/jetwc-register-with-promises.js +6 -1
- package/rulepacks/jetwc/jetwc-require-paths.js +6 -1
- package/rulepacks/jetwc/jetwc-required-subproperty.js +6 -0
- package/rulepacks/jetwc/jetwc-reserved-property.js +6 -1
- package/rulepacks/jetwc/jetwc-schema.js +6 -1
- package/rulepacks/jetwc/jetwc-semantic-version.js +6 -1
- package/rulepacks/jetwc/jetwc-slot-displayname.js +6 -1
- package/rulepacks/jetwc/jetwc-slots.js +6 -1
- package/rulepacks/jetwc/jetwc-standard-files.js +6 -1
- package/rulepacks/jetwc/jetwc-subproperty-writeback.js +6 -0
- package/rulepacks/jetwc/jetwc-template-slots.js +6 -1
- package/rulepacks/jetwc/jetwc-unused-events.js +6 -1
- package/rulepacks/jetwc/jetwc-unused-slots.js +6 -1
- package/rulepacks/jetwc/jetwc-vb-category.js +6 -1
- package/rulepacks/jetwc/jetwc-vb-icon.js +6 -1
- package/rulepacks/jetwc/jetwc-vcomponent-jetversion.js +6 -0
- package/rulepacks/jetwc/jetwc-vcomponent-loader.js +6 -0
- package/rulepacks/jetwc/jetwc-vcomponent-version.js +6 -0
- package/rulepacks/jetwc/jetwc-version-openrange.js +6 -1
- package/rulepacks/jetwc/jetwc-writeback-required.js +6 -1
- package/rulepacks/jetwc/msgid.json +6 -0
- package/rulepacks/jetwc/rules.json +6 -1
- package/rulepacks/jetwc-lib/jetwcutils-auditComponentCacheManager.js +6 -0
- package/rulepacks/jetwc-lib/jetwcutils-commonListenerImpls.js +6 -0
- package/rulepacks/jetwc-lib/jetwcutils-componentAuditUtils.js +6 -0
- package/rulepacks/jetwc-lib/jetwcutils-componentFinder.js +6 -0
- package/rulepacks/jetwc-lib/jetwcutils-preCompiler.js +6 -0
- package/rulepacks/jetwc-lib/jetwcutils-tsxUtils.js +6 -0
- package/rulepacks/jetwco/jetwco-bootstrap.js +6 -1
- package/rulepacks/jetwco/jetwco-cacc-auditConstraints.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-dependencies.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-dynamicSlots.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-eventBubbles.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-eventCancelable.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-eventPayload.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-events.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-helpers.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-jetVer.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-methodParamTypes.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-methodParams.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-methodReturnType.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-methods.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-packBundle.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-packBundleContent.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-packContent.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-properties.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-propertyDefault.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-propertyEnumeration.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-propertyReadOnly.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-propertyRequired.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-propertyType.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-propertyWriteback.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-publicModules.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-slotDataVariable.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-slotDataVariableType.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-slots.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-styleClasses.js +6 -0
- package/rulepacks/jetwco/jetwco-cacc-styleVariables.js +6 -0
- package/rulepacks/jetwco/jetwco-compjson-ns-reg.js +6 -1
- package/rulepacks/jetwco/jetwco-component-api-baseline-changes.js +6 -0
- package/rulepacks/jetwco/jetwco-component-api-changes.js +6 -1
- package/rulepacks/jetwco/jetwco-component-api-controlled-changes.js +6 -0
- package/rulepacks/jetwco/jetwco-component-cdn.js +6 -1
- package/rulepacks/jetwco/jetwco-description-standards.js +6 -0
- package/rulepacks/jetwco/jetwco-displayname-standards.js +6 -0
- package/rulepacks/jetwco/jetwco-exchange-version-check.js +6 -1
- package/rulepacks/jetwco/jetwco-license-info.js +6 -1
- package/rulepacks/jetwco/jetwco-prerelease-cdn.js +6 -1
- package/rulepacks/jetwco/jetwco-thirdparty-ba.js +6 -1
- package/rulepacks/jetwco/msgid.json +6 -0
- package/rulepacks/jetwco/rules.json +6 -1
- package/rulepacks/spoc/msgid.json +5 -0
- package/rulepacks/spoc/rules.json +5 -0
- package/rulepacks/spoc/spoc-dom-manip-inv-tag.js +5 -0
- package/rulepacks/spoc/spoc-dom-manip-tag-pos.js +5 -0
- package/rulepacks/spoc/spoc-dom-manip.js +5 -0
- package/{tests/rules/oj-js-diagnose/js_FAIL_1.js → rulepacks/wdt/msgid.json} +3 -9
- package/rulepacks/wdt/rules.json +6 -0
- package/rulepacks/wdt/wd-driver-sleep.js +6 -0
- package/rulepacks/wdt/wd-xpath.js +6 -0
- package/rules/jaf/jaf-css-diagnose.js +5 -0
- package/rules/jaf/jaf-html-diagnose.js +5 -0
- package/rules/jaf/jaf-init-schema.js +5 -0
- package/rules/jaf/jaf-js-diagnose.js +5 -0
- package/rules/jaf/jaf-ts-diagnose.js +6 -0
- package/rules/jaf/msgid.json +6 -1
- package/rules/jaf/rules.json +6 -1
- package/rules/jet/helpers/acc-aria-label.js +6 -1
- package/rules/jet/helpers/bp-checkPropType.js +5 -0
- package/rules/jet/helpers/cssHelper.js +6 -1
- package/rules/jet/helpers/extractStylesFromClass.js +6 -1
- package/rules/jet/helpers/has-slot-name.js +6 -1
- package/rules/jet/helpers/has-slot.js +5 -0
- package/rules/jet/helpers/json-prop-pos.js +5 -0
- package/rules/jet/helpers/json-propname-pos.js +5 -0
- package/rules/jet/helpers/style-selector.js +6 -1
- package/rules/jet/helpers/valid-attr.js +5 -0
- package/rules/jet/helpers/vartrack.js +5 -0
- package/rules/jet/jet-css-ojselector.js +5 -0
- package/rules/jet/msgid.json +6 -1
- package/rules/jet/oj-acc-aria-labelledby.js +5 -0
- package/rules/jet/oj-acc-aria-prop.js +6 -1
- package/rules/jet/oj-acc-avatar-aria-role.js +6 -1
- package/rules/jet/oj-acc-combobox-aria-label.js +6 -1
- package/rules/jet/oj-acc-film-strip-aria-label.js +6 -1
- package/rules/jet/oj-acc-input-aria-label.js +6 -1
- package/rules/jet/oj-acc-select-aria-label.js +6 -1
- package/rules/jet/oj-cca-compjson-bp-ar.js +5 -0
- package/rules/jet/oj-cca-compjson-bp-dsplyname.js +5 -0
- package/rules/jet/oj-cca-compjson-bp-jetver.js +5 -0
- package/rules/jet/oj-cca-compjson-bp-obj.js +5 -0
- package/rules/jet/oj-cca-compjson-ns-reg.js +5 -0
- package/rules/jet/oj-css-bp-border-color.js +5 -0
- package/rules/jet/oj-css-bp-dir-flow.js +6 -1
- package/rules/jet/oj-css-bp-float.js +5 -0
- package/rules/jet/oj-css-bp-textalign.js +5 -0
- package/rules/jet/oj-css-style-abs-units.js +6 -1
- package/rules/jet/oj-css-style-bp-color.js +5 -0
- package/rules/jet/oj-css-style-bp-display.js +6 -1
- package/rules/jet/oj-css-style-bp-font-family.js +6 -1
- package/rules/jet/oj-css-style-bp-font.js +5 -0
- package/rules/jet/oj-css-style-deprecated.js +6 -1
- package/rules/jet/oj-css-style-override.js +6 -1
- package/rules/jet/oj-css-var-override.js +5 -0
- package/rules/jet/oj-form-maxcols.js +6 -1
- package/rules/jet/oj-html-5-attr-obs.js +5 -0
- package/rules/jet/oj-html-5-tag-obs.js +5 -0
- package/rules/jet/oj-html-alta-deprecated.js +6 -0
- package/rules/jet/oj-html-attr-$unique.js +5 -0
- package/rules/jet/oj-html-attr-2def.js +5 -0
- package/rules/jet/oj-html-attr-json.js +6 -1
- package/rules/jet/oj-html-attr-prefix-expr.js +6 -1
- package/rules/jet/oj-html-attr-prefix-ro.js +5 -0
- package/rules/jet/oj-html-attr-req.js +5 -0
- package/rules/jet/oj-html-bindforeach-data.js +6 -1
- package/rules/jet/oj-html-bindif-test.js +6 -1
- package/rules/jet/oj-html-binding-attr.js +6 -1
- package/rules/jet/oj-html-cca-count.js +5 -0
- package/rules/jet/oj-html-cca-tagname.js +6 -1
- package/rules/jet/oj-html-cdn.js +5 -0
- package/rules/jet/oj-html-combo-converter.js +5 -0
- package/rules/jet/oj-html-cspexpr.js +6 -1
- package/rules/jet/oj-html-databind-all.js +5 -0
- package/rules/jet/oj-html-dlg-title.js +6 -1
- package/rules/jet/oj-html-file-pick-accept.js +6 -1
- package/rules/jet/oj-html-form-bindif.js +6 -1
- package/rules/jet/oj-html-form-layout-maxcols.js +6 -1
- package/rules/jet/oj-html-form-noflex.js +5 -0
- package/rules/jet/oj-html-input-isodate.js +6 -0
- package/rules/jet/oj-html-invalid-doctype.js +6 -1
- package/rules/jet/oj-html-jq-databind.js +6 -1
- package/rules/jet/oj-html-ko-comment.js +5 -0
- package/rules/jet/oj-html-ko-databind.js +6 -1
- package/rules/jet/oj-html-label-for-prefix.js +5 -0
- package/rules/jet/oj-html-missing-doctype.js +6 -1
- package/rules/jet/oj-html-msgs-cat-text.js +6 -0
- package/rules/jet/oj-html-no-style-tag.js +6 -0
- package/rules/jet/oj-html-notag-style.js +6 -0
- package/rules/jet/oj-html-oj-lib.js +5 -0
- package/rules/jet/oj-html-ojattr-520.js +6 -1
- package/rules/jet/oj-html-ojattr-deprecated.js +6 -1
- package/rules/jet/oj-html-ojattr-enum-deprecated.js +6 -1
- package/rules/jet/oj-html-ojattr-evt-syntax.js +6 -1
- package/rules/jet/oj-html-ojattr-value.js +6 -1
- package/rules/jet/oj-html-ojattr.js +6 -1
- package/rules/jet/oj-html-ojevent.js +6 -1
- package/rules/jet/oj-html-ojslot.js +6 -1
- package/rules/jet/oj-html-ojstyle.js +5 -0
- package/rules/jet/oj-html-ojtag-datacmd.js +6 -1
- package/rules/jet/oj-html-ojtag-datactx.js +5 -0
- package/rules/jet/oj-html-ojtag-deprecated.js +6 -1
- package/rules/jet/oj-html-ojtag-globattr-noprefix.js +6 -1
- package/rules/jet/oj-html-ojtag-id.js +5 -0
- package/rules/jet/oj-html-ojtag-nonglobattr-prefix.js +6 -1
- package/rules/jet/oj-html-ojtag-ns.js +5 -0
- package/rules/jet/oj-html-picker-attrs.js +6 -0
- package/rules/jet/oj-html-redwood-cssnovars.js +6 -0
- package/rules/jet/oj-html-redwood-cssvars.js +6 -0
- package/rules/jet/oj-html-self-close.js +5 -0
- package/rules/jet/oj-html-slot-item-minmax.js +6 -0
- package/rules/jet/oj-html-slot-name.js +6 -1
- package/rules/jet/oj-html-slot-pref-content.js +6 -0
- package/rules/jet/oj-html-style-abs-units.js +5 -0
- package/rules/jet/oj-html-style-bp-color.js +5 -0
- package/rules/jet/oj-html-style-bp-display.js +6 -1
- package/rules/jet/oj-html-style-bp-font-family.js +5 -0
- package/rules/jet/oj-html-style-bp-font.js +5 -0
- package/rules/jet/oj-html-style-deprecated.js +6 -1
- package/rules/jet/oj-html-style.js +6 -1
- package/rules/jet/oj-html-stylesel.js +6 -1
- package/rules/jet/oj-html-tag-attr-noprefix.js +6 -1
- package/rules/jet/oj-html-template-index.js +6 -1
- package/rules/jet/oj-html-unsup-theme.js +6 -1
- package/rules/jet/oj-html-wctag-$props.js +6 -1
- package/rules/jet/oj-html-wctag-arialabelledby.js +5 -0
- package/rules/jet/oj-html-wctag-for.js +5 -0
- package/rules/jet/oj-html-wctag-id.js +6 -1
- package/rules/jet/oj-html-wctag-nested.js +6 -0
- package/rules/jet/oj-html-wctag-packprivate.js +6 -0
- package/rules/jet/oj-js-comp-attr-deprecated.js +6 -1
- package/rules/jet/oj-js-comp-meth-deprecated.js +6 -1
- package/rules/jet/oj-js-no-ext-final.js +5 -0
- package/rules/jet/oj-js-noconsole.js +5 -0
- package/rules/jet/oj-js-ojcomp-deprecated.js +6 -1
- package/rules/jet/oj-js-ojcomp-exist.js +5 -0
- package/rules/jet/oj-js-ojcomp-new.js +5 -0
- package/rules/jet/oj-js-poly-promise.js +6 -1
- package/rules/jet/oj-js-var-undef.js +5 -0
- package/rules/jet/oj-json-syntax.js +5 -0
- package/rules/jet/oj-ts-comp-attr-deprecated.js +6 -1
- package/rules/jet/oj-ts-comp-meth-deprecated.js +6 -1
- package/rules/jet/oj-ts-no-ext-final.js +6 -0
- package/rules/jet/oj-ts-noconsole.js +6 -1
- package/rules/jet/oj-ts-ojcomp-deprecated.js +6 -1
- package/rules/jet/oj-ts-ojcomp-exist.js +6 -1
- package/rules/jet/oj-ts-ojcomp-new.js +6 -1
- package/rules/jet/oj-ts-poly-promise.js +6 -1
- package/rules/jet/rules.json +6 -1
- package/schema/component-schema.json +125 -2
- package/src/JafCore.js +6 -1
- package/types/index.d.ts +175 -37
- package/lib/stats.js +0 -1
- package/rulepacks/jetwc-lib/component-audit-utils.js +0 -1
- package/rules/exch/helpers/json-prop-pos.js +0 -1
- package/rules/exch/msgid.json +0 -1
- package/rules/exch/oj-cca-comp-zip-content-composite.js +0 -1
- package/rules/exch/oj-cca-comp-zip-content-pack.js +0 -1
- package/rules/exch/oj-cca-comp-zip-expand.js +0 -1
- package/rules/exch/oj-cca-compjson-evnames.js +0 -1
- package/rules/exch/oj-cca-compjson-file.js +0 -1
- package/rules/exch/oj-cca-compjson-prefix.js +0 -1
- package/rules/exch/oj-cca-compjson-prop-compdeps.js +0 -1
- package/rules/exch/oj-cca-compjson-prop-deps.js +0 -1
- package/rules/exch/oj-cca-compjson-prop-jetver.js +0 -1
- package/rules/exch/oj-cca-compjson-prop-obs.js +0 -1
- package/rules/exch/oj-cca-compjson-prop-type.js +0 -1
- package/rules/exch/oj-cca-compjson-prop-types.js +0 -1
- package/rules/exch/oj-cca-compjson-prop-undef.js +0 -1
- package/rules/exch/oj-cca-compjson-prop-version.js +0 -1
- package/rules/exch/oj-cca-compjson-schema.js +0 -1
- package/rules/exch/oj-cca-zip-compjson.js +0 -1
- package/rules/exch/rules.json +0 -1
- package/rules/jet/oj-css-bp-bgcolor.js +0 -1
- package/tests/components/attr-req-test/component.json +0 -1
- package/tests/components/demo-analog-clock/component.json +0 -1
- package/tests/components/demo-analog-clock/demo-analog-clock-viewModel.js +0 -1
- package/tests/components/demo-analog-clock/extension/demo/js/viewModels/demo.js +0 -1
- package/tests/components/demo-analog-clock/loader.js +0 -1
- package/tests/components/demo-card/component.json +0 -1
- package/tests/components/demo-chart-orientation-control/component.json +0 -1
- package/tests/components/demo-chart-stack-control/component.json +0 -1
- package/tests/components/made-up/component.json +0 -1
- package/tests/components/oj-made-up/component.json +0 -1
- package/tests/components/sp-activity-item/component.json +0 -1
- package/tests/config/config_base.json +0 -1
- package/tests/golden/10.0.0/golden_base.json +0 -1
- package/tests/golden/8.1.0/golden_base.json +0 -1
- package/tests/golden/9.0.0/golden_base.json +0 -1
- package/tests/rulepacks/hooks/hook-rpext.js +0 -1
- package/tests/rulepacks/hooks/hook-start-close-rulepack.js +0 -1
- package/tests/rulepacks/hooks/rule-rpext.js +0 -1
- package/tests/rulepacks/hooks/rules.json +0 -1
- package/tests/rulepacks/tags/proc_directive.js +0 -1
- package/tests/rulepacks/tags/rules.json +0 -1
- package/tests/rulepacks/tags/tag-count-setup.js +0 -1
- package/tests/rulepacks/tags/tag-count.js +0 -1
- package/tests/rules/bugs/JET-4770_PASS_1.html +0 -9
- package/tests/rules/comments/com_FAIL_1.js +0 -57
- package/tests/rules/comments/com_FAIL_2.js +0 -96
- package/tests/rules/comments/com_PASS_1.js +0 -42
- package/tests/rules/comments/com_PASS_2.js +0 -63
- package/tests/rules/comments/com_PASS_3.js +0 -40
- package/tests/rules/comments/com_PASS_4.js +0 -36
- package/tests/rules/comments/com_PASS_5.js +0 -19
- package/tests/rules/csp/html-script-unsafe-inline/FAIL_1.html +0 -11
- package/tests/rules/csp/html-script-unsafe-inline/FAIL_2.html +0 -8
- package/tests/rules/csp/html-script-unsafe-inline/PASS_1.html +0 -8
- package/tests/rules/csp/html-script-unsafe-inline/PASS_2.html +0 -8
- package/tests/rules/csp/html-script-unsafe-inline/PASS_3.html +0 -8
- package/tests/rules/csp/html-style-unsafe-inline/FAIL_1.html +0 -11
- package/tests/rules/csp/html-style-unsafe-inline/PASS_1.html +0 -11
- package/tests/rules/csp/html-unsafe-expr/FAIL_1.html +0 -14
- package/tests/rules/csp/html-unsafe-expr/PASS_1.html +0 -23
- package/tests/rules/csp/js-script-unsafe-eval/FAIL_1.js +0 -17
- package/tests/rules/csp/js-script-unsafe-eval/FAIL_2.js +0 -40
- package/tests/rules/csp/js-script-unsafe-eval/FAIL_3.js +0 -22
- package/tests/rules/csp/js-script-unsafe-eval/PASS_1.js +0 -20
- package/tests/rules/csp/js-script-unsafe-eval/PASS_2.js +0 -44
- package/tests/rules/csp/js-script-unsafe-eval/PASS_3.js +0 -16
- package/tests/rules/csp/js-style-unsafe-inline/FAIL_1.js +0 -25
- package/tests/rules/csp/js-style-unsafe-inline/PASS.js +0 -22
- package/tests/rules/demo/noself_FAIL_1.js +0 -101
- package/tests/rules/import/import_FAIL_1.js +0 -11
- package/tests/rules/import/import_PASS_1.js +0 -10
- package/tests/rules/jet-composites/demo-buttonset-enum/component.json +0 -57
- package/tests/rules/jet-composites/demo-buttonset-enum/loader.js +0 -19
- package/tests/rules/jet-composites/demo-buttonset-enum/view.html +0 -48
- package/tests/rules/jet-composites/demo-card/component.json +0 -28
- package/tests/rules/jet-composites/demo-card/loader.js +0 -16
- package/tests/rules/jet-composites/demo-card/view.html +0 -30
- package/tests/rules/jet-composites/demo-card/viewModel.js +0 -46
- package/tests/rules/jet-composites/demo-card/view_PASS_1.html +0 -21
- package/tests/rules/jet-composites/demo-contact-form/component.json +0 -23
- package/tests/rules/jet-composites/demo-contact-form/loader.js +0 -16
- package/tests/rules/jet-composites/demo-contact-form/view.html +0 -9
- package/tests/rules/jet-composites/demo-grocery-list/component.json +0 -18
- package/tests/rules/jet-composites/demo-grocery-list/loader.js +0 -19
- package/tests/rules/jet-composites/demo-grocery-list/view.html +0 -22
- package/tests/rules/jet-composites/demo-grocery-list/viewModel.js +0 -48
- package/tests/rules/jet-composites/dummy-component-1/component.json +0 -82
- package/tests/rules/jet-composites/dummy-component-2/component.json +0 -72
- package/tests/rules/jet-composites/foo-my-cca/component.json +0 -14
- package/tests/rules/jet-composites/foo-unsup-theme/component.json +0 -29
- package/tests/rules/jet-composites/header/component.json +0 -12
- package/tests/rules/jet-composites/oj-cgbu-omc/attribute-selection/component.json +0 -154
- package/tests/rules/jet-composites/oj-cgbu-omc/component.json +0 -11
- package/tests/rules/jet-composites/oj-cgbu-omc/reference/component.json +0 -185
- package/tests/rules/jet-composites/oj-cgbu-omc/wctag_props_FAIL_1.html +0 -34
- package/tests/rules/jet-composites/oj-enum-depr/component.json +0 -69
- package/tests/rules/jet-composites/oj-html-wctag-id/id_FAIL_1.html +0 -10
- package/tests/rules/jet-composites/oj-html-wctag-id/id_PASS_1.html +0 -6
- package/tests/rules/misc/oj.js +0 -12
- package/tests/rules/oj-acc-aria-labelledby/aria_labelledby_FAIL_1.html +0 -23
- package/tests/rules/oj-acc-aria-labelledby/aria_labelledby_FAIL_2.html +0 -22
- package/tests/rules/oj-acc-aria-labelledby/aria_labelledby_PASS_1.html +0 -23
- package/tests/rules/oj-acc-aria-labelledby/aria_labelledby_PASS_2.html +0 -22
- package/tests/rules/oj-acc-aria-labelledby/aria_labelledby_PASS_3.html +0 -22
- package/tests/rules/oj-acc-aria-labelledby/aria_labelledby_PASS_4.html +0 -22
- package/tests/rules/oj-acc-aria-labelledby/aria_labelledby_PASS_5.html +0 -22
- package/tests/rules/oj-acc-aria-prop/aria_prop_FAIL_1.html +0 -22
- package/tests/rules/oj-acc-avatar-aria-role/aria_avatar_role_FAIL_1.html +0 -20
- package/tests/rules/oj-acc-avatar-aria-role/aria_avatar_role_PASS_1.html +0 -23
- package/tests/rules/oj-acc-avatar-aria-role/aria_avatar_role_PASS_2.html +0 -24
- package/tests/rules/oj-acc-avatar-aria-role/aria_avatar_role_PASS_3.html +0 -21
- package/tests/rules/oj-acc-avatar-aria-role/aria_avatar_role_PASS_4.html +0 -22
- package/tests/rules/oj-acc-avatar-aria-role/aria_avatar_role_PASS_5.html +0 -22
- package/tests/rules/oj-acc-combobox-aria-label/aria_combo_many_FAIL_1.html +0 -20
- package/tests/rules/oj-acc-combobox-aria-label/aria_combo_many_FAIL_2.html +0 -21
- package/tests/rules/oj-acc-combobox-aria-label/aria_combo_many_PASS_1.html +0 -20
- package/tests/rules/oj-acc-combobox-aria-label/aria_combo_one_FAIL_1.html +0 -21
- package/tests/rules/oj-acc-combobox-aria-label/aria_combo_one_FAIL_2.html +0 -22
- package/tests/rules/oj-acc-combobox-aria-label/aria_combo_one_PASS_1.html +0 -22
- package/tests/rules/oj-acc-film-strip-aria-label/aria_filmstrip_FAIL_1.html +0 -18
- package/tests/rules/oj-acc-film-strip-aria-label/aria_filmstrip_FAIL_2.html +0 -18
- package/tests/rules/oj-acc-film-strip-aria-label/aria_filmstrip_PASS_1.html +0 -18
- package/tests/rules/oj-acc-film-strip-aria-label/aria_filmstrip_PASS_2.html +0 -19
- package/tests/rules/oj-acc-film-strip-aria-label/aria_filmstrip_PASS_3.html +0 -22
- package/tests/rules/oj-acc-input-aria-label/oj_input_date_FAIL_1.html +0 -21
- package/tests/rules/oj-acc-input-aria-label/oj_input_date_FAIL_2.html +0 -22
- package/tests/rules/oj-acc-input-aria-label/oj_input_date_PASS_1.html +0 -16
- package/tests/rules/oj-acc-input-aria-label/oj_input_date_PASS_2.html +0 -17
- package/tests/rules/oj-acc-input-aria-label/oj_input_date_PASS_3.html +0 -26
- package/tests/rules/oj-acc-input-aria-label/oj_input_date_time_FAIL_1.html +0 -19
- package/tests/rules/oj-acc-input-aria-label/oj_input_date_time_FAIL_2.html +0 -20
- package/tests/rules/oj-acc-input-aria-label/oj_input_date_time_PASS_1.html +0 -19
- package/tests/rules/oj-acc-input-aria-label/oj_input_number_FAIL_1.html +0 -17
- package/tests/rules/oj-acc-input-aria-label/oj_input_number_FAIL_2.html +0 -18
- package/tests/rules/oj-acc-input-aria-label/oj_input_number_PASS_1.html +0 -17
- package/tests/rules/oj-acc-input-aria-label/oj_input_password_FAIL_1.html +0 -17
- package/tests/rules/oj-acc-input-aria-label/oj_input_password_FAIL_2.html +0 -17
- package/tests/rules/oj-acc-input-aria-label/oj_input_password_PASS_1.html +0 -17
- package/tests/rules/oj-acc-input-aria-label/oj_input_text_3_PASS_1.html +0 -20
- package/tests/rules/oj-acc-input-aria-label/oj_input_text_FAIL_1.html +0 -20
- package/tests/rules/oj-acc-input-aria-label/oj_input_text_FAIL_2.html +0 -21
- package/tests/rules/oj-acc-input-aria-label/oj_input_text_PASS_2.html +0 -62
- package/tests/rules/oj-acc-input-aria-label/oj_input_text_nolabel_PASS_2.html +0 -17
- package/tests/rules/oj-acc-input-aria-label/oj_input_time_FAIL_1.html +0 -19
- package/tests/rules/oj-acc-input-aria-label/oj_input_time_FAIL_2.html +0 -20
- package/tests/rules/oj-acc-input-aria-label/oj_input_time_PASS_1.html +0 -19
- package/tests/rules/oj-acc-select-aria-label/aria_selectmany_FAIL_1.html +0 -19
- package/tests/rules/oj-acc-select-aria-label/aria_selectmany_FAIL_2.html +0 -20
- package/tests/rules/oj-acc-select-aria-label/aria_selectmany_PASS_1.html +0 -19
- package/tests/rules/oj-acc-select-aria-label/aria_selectone_FAIL_1.html +0 -20
- package/tests/rules/oj-acc-select-aria-label/aria_selectone_FAIL_2.html +0 -21
- package/tests/rules/oj-cca-comp-zip/zip_FAIL_1.zip +0 -1
- package/tests/rules/oj-cca-comp-zip/zip_FAIL_2.zip +0 -0
- package/tests/rules/oj-cca-comp-zip/zip_FAIL_3.zip +0 -0
- package/tests/rules/oj-cca-comp-zip/zip_FAIL_4.zip +0 -0
- package/tests/rules/oj-cca-comp-zip/zip_FAIL_5.zip +0 -0
- package/tests/rules/oj-cca-comp-zip/zip_FAIL_6.zip +0 -0
- package/tests/rules/oj-cca-comp-zip/zip_FAIL_7.zip +0 -0
- package/tests/rules/oj-cca-comp-zip/zip_FAIL_8.zip +0 -0
- package/tests/rules/oj-cca-comp-zip/zip_PASS_1.zip +0 -0
- package/tests/rules/oj-cca-ns-reg/oj-cca-ns-FAIL_1/component.json +0 -19
- package/tests/rules/oj-cca-ns-reg/oj-cca-ns-PASS_1/component.json +0 -19
- package/tests/rules/oj-cgbu-omc_tests/html_ojevent_FAIL_1.html +0 -15
- package/tests/rules/oj-cgbu-omc_tests/html_ojevent_PASS_1.html +0 -17
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_1/component.json +0 -16
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_10/component.json +0 -103
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_11/component.json +0 -24
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_12/component.json +0 -17
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_13/component.json +0 -17
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_14/component.json +0 -40
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_15/component.json +0 -24
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_16/component.json +0 -44
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_17/component.json +0 -8
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_18/component.json +0 -8
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_19/component.json +0 -8
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_2/component.json +0 -15
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_20/component.json +0 -18
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_21/component.json +0 -16
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_22/component.json +0 -19
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_3/component.json +0 -15
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_4/component.json +0 -16
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_5/component.json +0 -16
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_6/component.json +0 -18
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_7/component.json +0 -15
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_8/component.json +0 -15
- package/tests/rules/oj-compjson-syntax/ojcomp-FAIL_9/component.json +0 -52
- package/tests/rules/oj-compjson-syntax/ojcomp-PASS_1/component.json +0 -17
- package/tests/rules/oj-compjson-syntax/ojcomp-PASS_2/component.json +0 -88
- package/tests/rules/oj-compjson-syntax/ojcomp-PASS_3/component.json +0 -19
- package/tests/rules/oj-css-bp-dir-flow/dirflow_FAIL_1.html +0 -22
- package/tests/rules/oj-css-bp-dir-flow/dirflow_FAIL_2.html +0 -22
- package/tests/rules/oj-css-diagnose/css_FAIL_1.html +0 -14
- package/tests/rules/oj-css-diagnose/css_PASS_1.html +0 -14
- package/tests/rules/oj-css-var-override/varovr_FAIL_1.html +0 -8
- package/tests/rules/oj-html-5-attr-depr/attrdepr_FAIL_1.html +0 -16
- package/tests/rules/oj-html-5-attr-depr/attrdepr_PASS_1.html +0 -16
- package/tests/rules/oj-html-5-tag-depr/tagdepr_FAIL_1.html +0 -9
- package/tests/rules/oj-html-attr/attr_FAIL_1.html +0 -27
- package/tests/rules/oj-html-attr-$unique/attr_$unique1_FAIL_1.html +0 -19
- package/tests/rules/oj-html-attr-$unique/attr_$unique_FAIL_2.html +0 -25
- package/tests/rules/oj-html-attr-2def/attr2def_FAIL_1.html +0 -10
- package/tests/rules/oj-html-attr-2def/attr2def_PASS_1.html +0 -10
- package/tests/rules/oj-html-attr-json/attr-json_FAIL_1.html +0 -20
- package/tests/rules/oj-html-attr-json/attr-json_FAIL_2.html +0 -20
- package/tests/rules/oj-html-attr-json/attr-json_FAIL_3.html +0 -20
- package/tests/rules/oj-html-attr-json/attr-json_PASS_1.html +0 -20
- package/tests/rules/oj-html-attr-json/attr-json_PASS_2.html +0 -20
- package/tests/rules/oj-html-attr-json/attr-json_PASS_3.html +0 -8
- package/tests/rules/oj-html-attr-prefix-expr/attrprefixexpr_FAIL_1.html +0 -10
- package/tests/rules/oj-html-attr-prefix-expr/attrprefixexpr_PASS_1.html +0 -10
- package/tests/rules/oj-html-attr-prefix-ro/attrprefixro_FAIL_1.html +0 -10
- package/tests/rules/oj-html-attr-prefix-ro/attrprefixro_PASS_1.html +0 -10
- package/tests/rules/oj-html-attr-req/attrreq_FAIL_1.html +0 -17
- package/tests/rules/oj-html-attr-req/attrreq_FAIL_2.html +0 -13
- package/tests/rules/oj-html-attr-req/attrreq_FAIL_3.html +0 -8
- package/tests/rules/oj-html-attr-req/attrreq_FAIL_4.html +0 -13
- package/tests/rules/oj-html-attr-req/attrreq_FAIL_5.html +0 -17
- package/tests/rules/oj-html-attr-req/attrreq_PASS_1.html +0 -24
- package/tests/rules/oj-html-attr-req/attrreq_PASS_2.html +0 -24
- package/tests/rules/oj-html-attr-req/attrreq_PASS_3.html +0 -10
- package/tests/rules/oj-html-attr-req/attrreq_PASS_4.html +0 -11
- package/tests/rules/oj-html-bindforeach-data/bindforeach_data_FAIL_1.html +0 -19
- package/tests/rules/oj-html-bindforeach-data/bindforeach_data_PASS_1.html +0 -10
- package/tests/rules/oj-html-bindif-test/bindif_test_FAIL_1.html +0 -22
- package/tests/rules/oj-html-bindif-test/bindif_test_PASS_1.html +0 -11
- package/tests/rules/oj-html-binding-attr/binding-foreach_FAIL_2.html +0 -28
- package/tests/rules/oj-html-binding-attr/binding-if_FAIL_1.html +0 -23
- package/tests/rules/oj-html-binding-attr/binding-if_PASS_1.html +0 -23
- package/tests/rules/oj-html-cca-count/cca-count_FAIL_1.html +0 -119
- package/tests/rules/oj-html-cca-tagname/ccatag_FAIL_1.html +0 -7
- package/tests/rules/oj-html-cca-tagname/ccatag_PASS_1.html +0 -7
- package/tests/rules/oj-html-cca-tagname/tag_ns_FAIL_1.html +0 -8
- package/tests/rules/oj-html-cca-tagname/tag_ns_FAIL_2.html +0 -8
- package/tests/rules/oj-html-cca-tagname/tag_ns_FAIL_3.html +0 -8
- package/tests/rules/oj-html-cca-tagname/tag_ns_PASS_1.html +0 -10
- package/tests/rules/oj-html-cdn/html_cdn_FAIL_1.html +0 -18
- package/tests/rules/oj-html-cspexpr/cspexpr_FAIL_1.html +0 -14
- package/tests/rules/oj-html-cspexpr/cspexpr_FAIL_2.html +0 -10
- package/tests/rules/oj-html-cspexpr/cspexpr_PASS_1.html +0 -23
- package/tests/rules/oj-html-cspexpr/cspexpr_PASS_2.html +0 -10
- package/tests/rules/oj-html-cspexpr/cspexpr_PASS_3.html +0 -13
- package/tests/rules/oj-html-dlg-title/dlgtitle_FAIL_1.html +0 -12
- package/tests/rules/oj-html-dlg-title/dlgtitle_PASS_1.html +0 -12
- package/tests/rules/oj-html-form-noflex/noflex_FAIL_1.html +0 -10
- package/tests/rules/oj-html-invalid-doctype/doctype_invalid_FAIL_1.html +0 -20
- package/tests/rules/oj-html-invalid-doctype/doctype_invalid_FAIL_2.html +0 -13
- package/tests/rules/oj-html-invalid-doctype/doctype_invalid_FAIL_3.html +0 -16
- package/tests/rules/oj-html-invalid-doctype/doctype_invalid_FAIL_4.html +0 -13
- package/tests/rules/oj-html-invalid-doctype/doctype_invalid_PASS_1.html +0 -6
- package/tests/rules/oj-html-invalid-doctype/doctype_invalid_PASS_2.html +0 -7
- package/tests/rules/oj-html-invalid-doctype/doctype_invalid_PASS_3.html +0 -7
- package/tests/rules/oj-html-jq-databind/jq-databind_FAIL_1.html +0 -37
- package/tests/rules/oj-html-jq-databind/jq-databind_FAIL_2.html +0 -34
- package/tests/rules/oj-html-jq-databind/jq-databind_FAIL_3.html +0 -27
- package/tests/rules/oj-html-jq-databind/jq-databind_PASS_1.html +0 -30
- package/tests/rules/oj-html-ko-comment/ko-comment_FAIL_1.html +0 -47
- package/tests/rules/oj-html-ko-comment/ko-comment_FAIL_2.html +0 -36
- package/tests/rules/oj-html-ko-databind/ko-databind_FAIL_1.html +0 -24
- package/tests/rules/oj-html-ko-databind/ko-databind_FAIL_2.html +0 -36
- package/tests/rules/oj-html-ko-databind/ko-databind_FAIL_3.html +0 -29
- package/tests/rules/oj-html-label-for-prefix/for_FAIL_1.html +0 -8
- package/tests/rules/oj-html-label-for-prefix/for_PASS_1.html +0 -8
- package/tests/rules/oj-html-missing-doctype/doctype_missing_FAIL_1.html +0 -12
- package/tests/rules/oj-html-missing-doctype/doctype_missing_FAIL_2.html +0 -11
- package/tests/rules/oj-html-missing-doctype/doctype_missing_PASS_1.html +0 -14
- package/tests/rules/oj-html-missing-doctype/doctype_missing_PASS_2.html +0 -5
- package/tests/rules/oj-html-missing-doctype/doctype_missing_PASS_3.html +0 -12
- package/tests/rules/oj-html-missing-doctype/doctype_missing_PASS_5.html +0 -6
- package/tests/rules/oj-html-nonvoid-close/close_FAIL_1.html +0 -28
- package/tests/rules/oj-html-nonvoid-close/close_FAIL_2.html +0 -14
- package/tests/rules/oj-html-nonvoid-close/close_FAIL_3.html +0 -13
- package/tests/rules/oj-html-nonvoid-close/close_FAIL_5.html +0 -28
- package/tests/rules/oj-html-nonvoid-close/close_FAIL_6.html +0 -28
- package/tests/rules/oj-html-nonvoid-close/close_PASS_1.html +0 -7
- package/tests/rules/oj-html-oj-lib/oj_lib_FAIL_1.html +0 -15
- package/tests/rules/oj-html-ojattr/ojattr_PASS_1.html +0 -8
- package/tests/rules/oj-html-ojattr/ojattr_PASS_2.html +0 -10
- package/tests/rules/oj-html-ojattr/ojattr_PASS_3.html +0 -7
- package/tests/rules/oj-html-ojattr/ojattr_PASS_4.html +0 -7
- package/tests/rules/oj-html-ojattr-deprecated/ojattr-dep_FAIL1.html +0 -156
- package/tests/rules/oj-html-ojattr-enum-deprecated/enum_FAIL_1.html +0 -19
- package/tests/rules/oj-html-ojattr-enum-deprecated/enum_FAIL_2.html +0 -20
- package/tests/rules/oj-html-ojattr-enum-deprecated/enum_PASS_1.html +0 -25
- package/tests/rules/oj-html-ojattr-evt-syntax/evt-attr-syntax_FAIL_1.html +0 -6
- package/tests/rules/oj-html-ojattr-evt-syntax/evt-attr-syntax_PASS_1.html +0 -6
- package/tests/rules/oj-html-ojattr-value/attr-value_FAIL_1.html +0 -26
- package/tests/rules/oj-html-ojattr-value/attr-value_FAIL_2.html +0 -26
- package/tests/rules/oj-html-ojattr-value/attr-value_FAIL_3.html +0 -8
- package/tests/rules/oj-html-ojattr-value/attr-value_FAIL_4.html +0 -8
- package/tests/rules/oj-html-ojattr-value/attr-value_FAIL_5.html +0 -8
- package/tests/rules/oj-html-ojattr-value/attr-value_PASS_1.html +0 -26
- package/tests/rules/oj-html-ojattr-value/attr-value_PASS_2.html +0 -8
- package/tests/rules/oj-html-ojattr-value/attr-value_PASS_3.html +0 -7
- package/tests/rules/oj-html-ojattr-value/attr-value_PASS_6.html +0 -7
- package/tests/rules/oj-html-ojattr-value/attr-value_PASS_7.html +0 -10
- package/tests/rules/oj-html-ojattr-value/attr_value_PASS_4.html +0 -7
- package/tests/rules/oj-html-ojattr-value/attr_value_PASS_5.html +0 -9
- package/tests/rules/oj-html-ojslot/ojslot_FAIL_1.html +0 -11
- package/tests/rules/oj-html-ojslot/ojslot_PASS_1.html +0 -12
- package/tests/rules/oj-html-ojstyle/style_FAIL_1.html +0 -103
- package/tests/rules/oj-html-ojstyle/style_PASS_2.html +0 -7
- package/tests/rules/oj-html-ojtag-datacmd/datacmd_FAIL_1.html +0 -10
- package/tests/rules/oj-html-ojtag-datacmd/datacmd_FAIL_2.html +0 -18
- package/tests/rules/oj-html-ojtag-datacmd/datacmd_FAIL_3.html +0 -10
- package/tests/rules/oj-html-ojtag-datacmd/datacmd_PASS_1.html +0 -28
- package/tests/rules/oj-html-ojtag-datacmd/datacmd_PASS_2.html +0 -15
- package/tests/rules/oj-html-ojtag-datactx/datactx_FAIL_1.html +0 -14
- package/tests/rules/oj-html-ojtag-datactx/datactx_PASS_1.html +0 -14
- package/tests/rules/oj-html-ojtag-globattr-noprefix/globattr-noprefix_FAIL_1.html +0 -36
- package/tests/rules/oj-html-ojtag-nonglobattr-prefix/nonglobattr-prefix_FAIL_1.html +0 -26
- package/tests/rules/oj-html-slot-name/slot_name.FAIL_1.html +0 -24
- package/tests/rules/oj-html-slot-name/slot_name.FAIL_2.html +0 -46
- package/tests/rules/oj-html-slot-name/slot_name.FAIL_3.html +0 -10
- package/tests/rules/oj-html-slot-name/slot_name.PASS_1.html +0 -24
- package/tests/rules/oj-html-slot-name/slot_name.PASS_2.html +0 -39
- package/tests/rules/oj-html-slot-name/slot_name.PASS_3.html +0 -10
- package/tests/rules/oj-html-slot-name/slot_name_PASS_4.html +0 -16
- package/tests/rules/oj-html-slot-name/slot_name_PASS_5.html +0 -11
- package/tests/rules/oj-html-slot-name/slot_name_PASS_6.html +0 -14
- package/tests/rules/oj-html-slot-name/slot_name_PASS_7.html +0 -10
- package/tests/rules/oj-html-style/style_FAIL_1.html +0 -7
- package/tests/rules/oj-html-style/style_PASS_1.html +0 -12
- package/tests/rules/oj-html-style/style_PASS_2.html +0 -7
- package/tests/rules/oj-html-style-bp-color/color-FAIL_1.html +0 -17
- package/tests/rules/oj-html-style-bp-color/color-FAIL_2.html +0 -15
- package/tests/rules/oj-html-style-bp-color/color-FAIL_3.html +0 -7
- package/tests/rules/oj-html-style-bp-color/color-PASS_1.html +0 -7
- package/tests/rules/oj-html-style-bp-font-family/fam_FAIL_1.html +0 -23
- package/tests/rules/oj-html-tag-attr-noprefix/attr-noprefix_FAIL_1.html +0 -15
- package/tests/rules/oj-html-tag-attr-noprefix/attr-noprefix_FAIL_2.html +0 -9
- package/tests/rules/oj-html-tag-attr-noprefix/attr-noprefix_PASS_1.html +0 -9
- package/tests/rules/oj-html-unsup-theme/unsup_FAIL_1.html +0 -8
- package/tests/rules/oj-html-wctag-for/for_FAIL_1.html +0 -8
- package/tests/rules/oj-html-wctag-for/for_PASS_1.html +0 -8
- package/tests/rules/oj-js-comp-attr-deprecated/attr-del_FAIL_1.js +0 -20
- package/tests/rules/oj-js-comp-attr-deprecated/attr-dep_FAIL_1.js +0 -20
- package/tests/rules/oj-js-comp-meth-deprecated/meth-del_FAIL_1.js +0 -20
- package/tests/rules/oj-js-comp-meth-deprecated/meth-dep_FAIL_1.js +0 -20
- package/tests/rules/oj-js-define-promise/def-prom_FAIL_1.js +0 -16
- package/tests/rules/oj-js-define-promise/def-prom_FAIL_2.js +0 -16
- package/tests/rules/oj-js-diagnose/es6_PASS_1.js +0 -24
- package/tests/rules/oj-js-no-ext-final/noextfinal_FAIL_1.js +0 -30
- package/tests/rules/oj-js-no-ext-final/noextfinal_FAIL_2.js +0 -23
- package/tests/rules/oj-js-no-ext-final/noextfinal_FAIL_3.js +0 -22
- package/tests/rules/oj-js-no-ext-final/noextfinal_FAIL_4.js +0 -20
- package/tests/rules/oj-js-no-ext-final/noextfinal_FAIL_5.js +0 -24
- package/tests/rules/oj-js-no-ext-final/noextfinal_FAIL_6.js +0 -30
- package/tests/rules/oj-js-no-ext-final/noextfinal_FAIL_7.js +0 -15
- package/tests/rules/oj-js-no-ext-final/noextfinal_FAIL_8.js +0 -16
- package/tests/rules/oj-js-no-ext-final/noextfinal_PASS_1.js +0 -17
- package/tests/rules/oj-js-no-ext-final/noextfinal_PASS_2.js +0 -17
- package/tests/rules/oj-js-noconsole/nocons_FAIL_1.js +0 -11
- package/tests/rules/oj-js-ojcomp-deprecated/jscomp_FAIL_1.js +0 -27
- package/tests/rules/oj-json-syntax/json_FAIL_1.json +0 -8
- package/tests/rules/oj-json-syntax/json_FAIL_2.json +0 -12
- package/tests/rules/oj-json-syntax/json_PASS_1.json +0 -25
- package/tests/rules/oj-json-syntax/json_PASS_2.json +0 -12
- package/tests/rules/oj-json-syntax/json_PASS_3.json +0 -14
- package/tests/rules/ojcompjson/attrreq_FAIL_1/component.json +0 -69
- package/tests/rules/pack-compjson/audit-pack/component-1/component-1-view.html +0 -6
- package/tests/rules/pack-compjson/audit-pack/component-1/component-1-viewModel.js +0 -56
- package/tests/rules/pack-compjson/audit-pack/component-1/component.json +0 -13
- package/tests/rules/pack-compjson/audit-pack/component-1/loader.js +0 -20
- package/tests/rules/pack-compjson/audit-pack/component-1/resources/nls/component-1-strings.js +0 -18
- package/tests/rules/pack-compjson/audit-pack/component-2/component-2-view.html +0 -5
- package/tests/rules/pack-compjson/audit-pack/component-2/component-2-viewModel.js +0 -56
- package/tests/rules/pack-compjson/audit-pack/component-2/component.json +0 -13
- package/tests/rules/pack-compjson/audit-pack/component-2/loader.js +0 -20
- package/tests/rules/pack-compjson/audit-pack/component-2/resources/nls/component-1-strings.js +0 -18
- package/tests/rules/pack-compjson/audit-pack/component.json +0 -12
- package/tests/rules/pack-compjson/audit-singleton-1/audit-singleton-1-view.html +0 -5
- package/tests/rules/pack-compjson/audit-singleton-1/audit-singleton-1-viewModel.js +0 -56
- package/tests/rules/pack-compjson/audit-singleton-1/component.json +0 -20
- package/tests/rules/pack-compjson/audit-singleton-1/loader.js +0 -20
- package/tests/rules/pack-compjson/audit-singleton-1/resources/nls/audit-singleton-1-strings.js +0 -18
- package/tests/rules/pack-compjson/audit-singleton-2/audit-singleton-2-view.html +0 -8
- package/tests/rules/pack-compjson/audit-singleton-2/audit-singleton-2-viewModel.js +0 -56
- package/tests/rules/pack-compjson/audit-singleton-2/component.json +0 -15
- package/tests/rules/pack-compjson/audit-singleton-2/loader.js +0 -20
- package/tests/rules/pack-compjson/audit-singleton-2/resources/nls/audit-singleton-2-strings.js +0 -18
- package/tests/rules/parse-html/proc_instr.html +0 -9
- package/tests/rules/spoc-dom-manip/dom-manip_FAIL_1.js +0 -113
- package/tests/rules/spoc-dom-manip/dom-manip_FAIL_2.js +0 -151
- package/tests/rules/spoc-dom-manip/dom-manip_PASS_1.js +0 -149
- package/tests/rules/spoc-dom-manip/dom-manip_PASS_2.js +0 -147
- package/tests/rules/spoc-dom-manip/dom-manip_PASS_3.js +0 -147
- package/tests/rules/spoc-dom-manip/dom-manip_PASS_4.js +0 -20
- package/tests/rules/spoc-dom-manip/dom-manip_PASS_5.js +0 -246
- package/tests/rules/tab-tests/tab-test_FAIL_1.html +0 -37
- package/tests/rules/tab-tests/tab-test_FAIL_2.html +0 -8
- package/tests/rules/webcomptests/jet-composites/oj-html-wctag-$props/prop_PASS_1.html +0 -8
- package/tests/rules/webcomptests/jet-composites/oj-html-wctag-$props/prop_PASS_2.html +0 -8
- package/tests/rules/webcomptests/jet-composites/oj-html-wctag-for/for_FAIL_1.html +0 -8
- package/tests/rules/webcomptests/jet-composites/oj-html-wctag-for/for_PASS_1.html +0 -8
- package/tests/src/JetTest.js +0 -1
- package/tests/src/server.js +0 -1
- package/tests/test.js +0 -1
package/types/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @ignore
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
declare namespace ojaf {
|
|
9
|
+
declare namespace ojaf {
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* General Interface for a rule
|
|
@@ -121,32 +121,32 @@ declare namespace ojaf {
|
|
|
121
121
|
|
|
122
122
|
// Types to support ListenerSet ----------------------------------------------------
|
|
123
123
|
export interface ListenerSet {
|
|
124
|
-
"startup"?:
|
|
125
|
-
"closedown"?:
|
|
126
|
-
"startaudit"?:
|
|
127
|
-
"endaudit"?:
|
|
128
|
-
"startupRP"?:
|
|
129
|
-
"
|
|
130
|
-
"webcomp"?:
|
|
131
|
-
"elem"?:
|
|
132
|
-
"tag"?:
|
|
133
|
-
"ojtag"?:
|
|
134
|
-
"script"?:
|
|
135
|
-
"link"?:
|
|
136
|
-
"attr"?:
|
|
137
|
-
"attrexpr"?:
|
|
138
|
-
"class"?:
|
|
139
|
-
"style"?:
|
|
140
|
-
"type"?:
|
|
141
|
-
"event"?:
|
|
142
|
-
"comment"?:
|
|
143
|
-
"doctype"?:
|
|
144
|
-
"procstmt"?:
|
|
145
|
-
"directive"?:
|
|
146
|
-
"json"?:
|
|
147
|
-
"compjson"?:
|
|
148
|
-
"file"?:
|
|
149
|
-
"endfile"?:
|
|
124
|
+
"startup"?: RuleListener,
|
|
125
|
+
"closedown"?: RuleListener,
|
|
126
|
+
"startaudit"?: RuleListener,
|
|
127
|
+
"endaudit"?: RuleListener,
|
|
128
|
+
"startupRP"?: RuleListener,
|
|
129
|
+
"closedownRP"?: RuleListener,
|
|
130
|
+
"webcomp"?: ElementListener,
|
|
131
|
+
"elem"?: ElementListener,
|
|
132
|
+
"tag"?: ElementListener,
|
|
133
|
+
"ojtag"?: ElementListener,
|
|
134
|
+
"script"?: ElementListener,
|
|
135
|
+
"link"?: ElementListener,
|
|
136
|
+
"attr"?: AttrListener,
|
|
137
|
+
"attrexpr"?: AttrListener,
|
|
138
|
+
"class"?: AttrListener,
|
|
139
|
+
"style"?: AttrListener,
|
|
140
|
+
"type"?: AttrListener,
|
|
141
|
+
"event"?: EventListener,
|
|
142
|
+
"comment"?: CommentListener,
|
|
143
|
+
"doctype"?: DocTypeListener,
|
|
144
|
+
"procstmt"?: StatementListener,
|
|
145
|
+
"directive"?: StatementListener,
|
|
146
|
+
"json"?: JsonListener,
|
|
147
|
+
"compjson"?: JsonListener,
|
|
148
|
+
"file"?: FileListener,
|
|
149
|
+
"endfile"?: FileListener,
|
|
150
150
|
"startscript"?: FileListener,
|
|
151
151
|
"endscript"?: FileListener,
|
|
152
152
|
"AssignmentExpression"?: AstListener,
|
|
@@ -228,6 +228,7 @@ declare namespace ojaf {
|
|
|
228
228
|
"ImportSpecifier"?: AstListener,
|
|
229
229
|
"ImportDefaultSpecifier"?: AstListener,
|
|
230
230
|
"ImportNamespaceSpecifier"?: AstListener,
|
|
231
|
+
"TSImportEqualsDeclaration"?:AstListener,
|
|
231
232
|
"css-sheet"?: CssListener,
|
|
232
233
|
"css-rule"?: CssListener,
|
|
233
234
|
"css-atrule"?: CssAtRuleListener,
|
|
@@ -247,6 +248,18 @@ declare namespace ojaf {
|
|
|
247
248
|
|
|
248
249
|
// Rule Listener Contexts -----------------------------------------------------------
|
|
249
250
|
|
|
251
|
+
export interface RuleListenerContext {
|
|
252
|
+
Issue: any, //TODO
|
|
253
|
+
ojetConfig?:object, //TODO
|
|
254
|
+
phase: string,
|
|
255
|
+
type:string,
|
|
256
|
+
sysOpts:SysOpts,
|
|
257
|
+
utils: ContextUtils,
|
|
258
|
+
reporter: IssueReporter,
|
|
259
|
+
ruleName:string,
|
|
260
|
+
rulePack:RulePack
|
|
261
|
+
}
|
|
262
|
+
|
|
250
263
|
/**
|
|
251
264
|
* Base listener context containing all of the common attributes
|
|
252
265
|
*/
|
|
@@ -260,10 +273,11 @@ declare namespace ojaf {
|
|
|
260
273
|
reporter: IssueReporter,
|
|
261
274
|
ruleName:string,
|
|
262
275
|
rulePack:RulePack,
|
|
263
|
-
|
|
276
|
+
filepath:string
|
|
264
277
|
}
|
|
265
278
|
|
|
266
279
|
export interface LifecycleListener {(context:RegisterContext): null|boolean}
|
|
280
|
+
export interface RuleListener {(context:RuleListenerContext): null|boolean}
|
|
267
281
|
export interface ElementListener {(context: ElementListenerContext, elementName: string): void}
|
|
268
282
|
export interface AttrListener {(context: ElementListenerContext, name: string,value: string|Array<string>, rawValue: string): void}
|
|
269
283
|
export interface EventListener {(context: ElementListenerContext, event:string,eventValue:EventListenerValue): void}
|
|
@@ -315,7 +329,7 @@ declare namespace ojaf {
|
|
|
315
329
|
|
|
316
330
|
// Supporting Types and Interfaces for the base rule listener context
|
|
317
331
|
export interface IssueReporter {
|
|
318
|
-
addIssue(issue: any, context: AuditListenerContext, severity: SEVERITY):void
|
|
332
|
+
addIssue(issue: any, context: AuditListenerContext|RuleListenerContext, severity: SEVERITY):void
|
|
319
333
|
}
|
|
320
334
|
|
|
321
335
|
export interface EventListenerValue {
|
|
@@ -331,6 +345,8 @@ declare namespace ojaf {
|
|
|
331
345
|
start:number,
|
|
332
346
|
end:number,
|
|
333
347
|
name?:string,
|
|
348
|
+
source?:AstNode,
|
|
349
|
+
moduleReference?:AstNode,
|
|
334
350
|
elements?:Array<AstNode>,
|
|
335
351
|
raw?:string,
|
|
336
352
|
value?:string,
|
|
@@ -424,9 +440,12 @@ declare namespace ojaf {
|
|
|
424
440
|
isProperty(obj: object, name: string): boolean,
|
|
425
441
|
getProperty(obj: object, name: string): any,
|
|
426
442
|
getType(varName: any): string,
|
|
427
|
-
isArrayContentsType(array: Array<any>, type: string): boolean,
|
|
443
|
+
isArrayContentsType(array: Array<any>, type: string|Array<string>): boolean,
|
|
444
|
+
decommentJson(data: string): string,
|
|
445
|
+
parseJson(data:string,comments?:boolean):object, //TODO
|
|
428
446
|
eatWhitespace(str: string, startIndex: number): string,
|
|
429
|
-
getIndexToWhiteSpace(str: string, startIndex: number): number
|
|
447
|
+
getIndexToWhiteSpace(str: string, startIndex: number): number,
|
|
448
|
+
getLineStart(str: string, index: number): number
|
|
430
449
|
}
|
|
431
450
|
|
|
432
451
|
export interface FsUtils {
|
|
@@ -509,9 +528,16 @@ declare namespace ojaf {
|
|
|
509
528
|
getFirst(): DomNode,
|
|
510
529
|
getFirstElement(): DomNode,
|
|
511
530
|
getLast(): DomNode,
|
|
531
|
+
getBody(): DomNode,
|
|
532
|
+
getHead(): DomNode,
|
|
533
|
+
getLinks(): Array<DomNode>,
|
|
534
|
+
getScripts(): Array<DomNode>,
|
|
512
535
|
getElemsByName(elemName: string): Array<DomNode>,
|
|
513
536
|
getElemById(id: string): DomNode,
|
|
514
|
-
getElems(): Array<DomNode
|
|
537
|
+
getElems(): Array<DomNode>,
|
|
538
|
+
|
|
539
|
+
isExpression(val: string): boolean,
|
|
540
|
+
getExpression(val: string): string|null
|
|
515
541
|
}
|
|
516
542
|
|
|
517
543
|
/**
|
|
@@ -522,12 +548,14 @@ declare namespace ojaf {
|
|
|
522
548
|
isJetTag(tag:string):boolean,
|
|
523
549
|
isComponentTag(tag:string):boolean,
|
|
524
550
|
isTagDeprecated(tag:string):string|null,
|
|
551
|
+
isTagPackPrivate(tag:string):boolean,
|
|
525
552
|
isTagAttrDeprecated(tag:string, attrName:string):string|null,
|
|
526
553
|
isTagAttr(tag:string, attrName:string):boolean,
|
|
527
554
|
isTagAttrValue(tag:string, attrName:string, value:string):boolean,
|
|
528
555
|
hasTagAttrValues(tag:string, attrName:string):boolean,
|
|
529
556
|
hasTagSlot(tag:string):boolean,
|
|
530
|
-
|
|
557
|
+
isTagSlotName(tag:string, slotName:string):boolean,
|
|
558
|
+
isTagSlotValue(tag:string, slotValue:string):boolean, // DEPRECATED
|
|
531
559
|
isTagEvent(tag:string, eventName:string):boolean,
|
|
532
560
|
isTagSupportedInTheme(tag:string):boolean,
|
|
533
561
|
isAttrSupportedInTheme(tag:string, attrName:string):boolean,
|
|
@@ -544,6 +572,7 @@ declare namespace ojaf {
|
|
|
544
572
|
getTagFromClass(className:string):string|null,
|
|
545
573
|
getClassFromModule(module:string):string|null,
|
|
546
574
|
getTagPropType(tagName:string, propName:string):string|null,
|
|
575
|
+
getPreferredSlotContent(tag:string, slot:string):Array<string>|null,
|
|
547
576
|
isBindingTag(tagName:string):boolean,
|
|
548
577
|
isClassRenamed(className:string):RenamedInfo|null,
|
|
549
578
|
isClassDeleted(className:string):string|null,
|
|
@@ -566,7 +595,10 @@ declare namespace ojaf {
|
|
|
566
595
|
getDeletedMemberList():object, //TODO
|
|
567
596
|
getRevisionInfo():JetRevisionInfo,
|
|
568
597
|
getMetaVers():object, //TODO
|
|
569
|
-
walkDomStackForOJTag(context:AuditListenerContext, excludeBindIf?:boolean):string|null
|
|
598
|
+
walkDomStackForOJTag(context:AuditListenerContext, excludeBindIf?:boolean):string|null,
|
|
599
|
+
isTagAttrTranslatable(tag:string, attrName:string):boolean,
|
|
600
|
+
getTagAttrType(tag:string, attrName:string):string|null,
|
|
601
|
+
getTagAttrMetadata(tag:string, attrName:string):object|null
|
|
570
602
|
}
|
|
571
603
|
|
|
572
604
|
export interface RenamedInfo {
|
|
@@ -589,13 +621,117 @@ declare namespace ojaf {
|
|
|
589
621
|
getProgram():AstNode,
|
|
590
622
|
isFuncArg(node:AstNode, varName:string):boolean,
|
|
591
623
|
isCommonDocApi(methodName:string):boolean,
|
|
592
|
-
parseDefine(node:AstNode):null|FlattenedDefine
|
|
624
|
+
parseDefine(node:AstNode):null|FlattenedDefine,
|
|
625
|
+
getNodeTypes():AstNodeTypeExports
|
|
593
626
|
}
|
|
594
627
|
|
|
595
628
|
//Supporting types and interfaces for AstUtils
|
|
596
629
|
export interface FlattenedDefine {
|
|
597
630
|
[parameterName:string]:string
|
|
598
631
|
}
|
|
632
|
+
export interface AstNodeTypeExports {
|
|
633
|
+
ARRAY_EXPR : string,
|
|
634
|
+
ARROW_FUNC_EXPR : string,
|
|
635
|
+
ASSIGN_PATTERN : string,
|
|
636
|
+
ASSIGN_EXPR : string,
|
|
637
|
+
ASSIGNMENT_EXPR : string,
|
|
638
|
+
AWAIT_EXPR : string,
|
|
639
|
+
BINARY_EXPR : string,
|
|
640
|
+
BLOCK_STMT : string,
|
|
641
|
+
BREAK_STMT : string,
|
|
642
|
+
CALL_EXPR : string,
|
|
643
|
+
CATCH_CLAUSE : string,
|
|
644
|
+
CLASS_BODY : string,
|
|
645
|
+
CLASS_DECLARATION : string,
|
|
646
|
+
CLASS_EXPR : string,
|
|
647
|
+
CLASS_PROP : string,
|
|
648
|
+
CONDITIONAL_EXPR : string,
|
|
649
|
+
CONTINUE_STMT : string,
|
|
650
|
+
DO_WHILE_STMT : string,
|
|
651
|
+
DEBUG_STMT : string,
|
|
652
|
+
EMPTY_STMT : string,
|
|
653
|
+
EX_REST_PROP : string,
|
|
654
|
+
EX_SPREAD_STMT : string,
|
|
655
|
+
EXPR_STMT : string,
|
|
656
|
+
FOR_STMT : string,
|
|
657
|
+
FOR_IN_STMT : string,
|
|
658
|
+
FOR_OF_STMT : string,
|
|
659
|
+
FUNC_DECLARATION : string,
|
|
660
|
+
FUNC_EXPR : string,
|
|
661
|
+
IDENTIFIER : string,
|
|
662
|
+
IF_STMT : string,
|
|
663
|
+
LOGIC_EXPR : string,
|
|
664
|
+
LABELED_STMT : string,
|
|
665
|
+
LITERAL : string,
|
|
666
|
+
MEMBER_EXPR : string,
|
|
667
|
+
META_PROP : string,
|
|
668
|
+
METH_DEF : string,
|
|
669
|
+
NEW_EXPR : string,
|
|
670
|
+
OBJ_EXPR : string,
|
|
671
|
+
OBJ_PATTERN : string,
|
|
672
|
+
PROGRAM : string,
|
|
673
|
+
PROPERTY : string,
|
|
674
|
+
REST_ELEM : string,
|
|
675
|
+
RETURN_STMT : string,
|
|
676
|
+
SEQUENCE_EXPR : string,
|
|
677
|
+
SPREAD_ELEM : string,
|
|
678
|
+
SUPER : string,
|
|
679
|
+
SWITCH_CASE : string,
|
|
680
|
+
SWITCH_STMT : string,
|
|
681
|
+
TAGGED_TEMPLATE_EXPR : string,
|
|
682
|
+
TEMPLATE_ELEM : string,
|
|
683
|
+
TEMPLATE_LIT : string,
|
|
684
|
+
THIS_EXPR : string,
|
|
685
|
+
THROW_EXPR : string,
|
|
686
|
+
TRY_STMT : string,
|
|
687
|
+
UNARY_EXPR : string,
|
|
688
|
+
UPDATE_EXPR : string,
|
|
689
|
+
VAR_DECLARATION : string,
|
|
690
|
+
VAR_DECLARATOR : string,
|
|
691
|
+
WHILE_STMT : string,
|
|
692
|
+
WITH_STMT : string,
|
|
693
|
+
YIELD_EXPR : string,
|
|
694
|
+
JSX_ID : string,
|
|
695
|
+
JSX_NS_NAME : string,
|
|
696
|
+
JSX_EMPTY_EXPR : string,
|
|
697
|
+
JSX_EXPR_CONTAINER : string,
|
|
698
|
+
JSX_ELEM : string,
|
|
699
|
+
JSX_CLOSING_ELEM : string,
|
|
700
|
+
JSX_OPENING_ELEM : string,
|
|
701
|
+
JSX_ATTRIB : string,
|
|
702
|
+
JSX_SPREAD_ATTRIB : string,
|
|
703
|
+
JSX_TEXT : string,
|
|
704
|
+
EXPORT_DEFAULT_DECL : string,
|
|
705
|
+
EXPORT_NAMED_DECL : string,
|
|
706
|
+
EXPORT_ALL_DECL : string,
|
|
707
|
+
EXPORT_ASSIGNMENT : string,
|
|
708
|
+
EXPORT_SPECIFIER : string,
|
|
709
|
+
IMPORT_DECL : string,
|
|
710
|
+
IMPORT_EQUALS_DECL : string,
|
|
711
|
+
IMPORT_SPECIFIER : string,
|
|
712
|
+
IMPORT_DEF_SPECIFIER : string,
|
|
713
|
+
IMPORT_NS_SPECIFIER : string,
|
|
714
|
+
ANY_KEYWORD : string,
|
|
715
|
+
ARRAY_TYPE : string,
|
|
716
|
+
AS_EXPR : string,
|
|
717
|
+
BOOLEAN_KEYWORD : string,
|
|
718
|
+
EXTERN_MOD_REF : string,
|
|
719
|
+
FUNCTION_TYPE : string,
|
|
720
|
+
INTERFACE_BODY : string,
|
|
721
|
+
INTERFACE_DECL : string,
|
|
722
|
+
INTERSECTION_TYPE : string,
|
|
723
|
+
LITERAL_TYPE : string,
|
|
724
|
+
NUMBER_KEYWORD : string,
|
|
725
|
+
OBJECT_KEYWORD : string,
|
|
726
|
+
OPTIONAL_TYPE : string,
|
|
727
|
+
PROPERTY_SIGNATURE : string,
|
|
728
|
+
STRING_KEYWORD : string,
|
|
729
|
+
TUPLE_TYPE : string,
|
|
730
|
+
TYPE_ALIAS_DECL : string,
|
|
731
|
+
TYPE_LITERAL : string,
|
|
732
|
+
TYPE_REF : string,
|
|
733
|
+
UNION_TYPE : string
|
|
734
|
+
}
|
|
599
735
|
|
|
600
736
|
/**
|
|
601
737
|
* Utilities for working with CSS
|
|
@@ -635,7 +771,8 @@ declare namespace ojaf {
|
|
|
635
771
|
procstmt = "procstmt",
|
|
636
772
|
directive = "directive",
|
|
637
773
|
json = "json",
|
|
638
|
-
compjson = "compjson"
|
|
774
|
+
compjson = "compjson",
|
|
775
|
+
text = "text"
|
|
639
776
|
}
|
|
640
777
|
|
|
641
778
|
export const enum AST_NODE_TYPE {
|
|
@@ -717,7 +854,8 @@ declare namespace ojaf {
|
|
|
717
854
|
ImportDeclaration = "ImportDeclaration",
|
|
718
855
|
ImportSpecifier = "ImportSpecifier",
|
|
719
856
|
ImportDefaultSpecifier = "ImportDefaultSpecifier",
|
|
720
|
-
ImportNamespaceSpecifier = "ImportNamespaceSpecifier"
|
|
857
|
+
ImportNamespaceSpecifier = "ImportNamespaceSpecifier",
|
|
858
|
+
TSImportEqualsDeclaration = "TSImportEqualsDeclaration"
|
|
721
859
|
}
|
|
722
860
|
|
|
723
861
|
export const enum CSS_NODE_TYPE {
|
package/lib/stats.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const FULL_BLOCK="\u2588";const HALF_ELEM="\u2588";const FOURTH_ELEM="\u258C";function Stats(oStats,width,cmode,oColors){this._maxWidth=width;this._colorMode=cmode;this._Colors=oColors;this._count=0;var nums=[oStats.critical,oStats.blocker,oStats.major,oStats.minor,oStats.info];this._total=_sum(nums);this._maxBar=this._barLengths(nums);this._factor=this._maxBar>1?this._maxWidth/this._maxBar:1};Stats.prototype.bar=function(n){var ret,val=n/this._total*this._maxWidth;if(val>0.5&&val<1){ret=HALF_ELEM.repeat(this._factor)}else if(val===0){ret=""}else if(val<0.5){ret=FOURTH_ELEM.repeat(this._factor)}else{ret=FULL_BLOCK.repeat(val*this._factor)}if(this._colorMode){ret=++this._count<=2?this._Colors.RED(ret):this._count<=4?this._Colors.BRIGHTBLUE(ret):this._Colors.GREEN(ret)}return ret};Stats.prototype._barLengths=function(nums){var i,max=0,n;for(i=0;i<nums.length;i++){n=nums[i]/this._total*this._maxWidth;if(n>max){max=n}}this._factor=max>1?this._maxWidth/max:1;return max};function _sum(nums){var t=0,i;for(i=0;i<nums.length;i++){if(!isNaN(nums[i])){t+=nums[i]}}return t};module.exports=Stats;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const path=require('path');const Utils=function(){this.rootPoint=path.resolve('.').length+1;this.jaf28plus;this.isWindows=path.sep!=='/';this.noJSWarnDone=false};Utils.prototype.matchComponentPath=function(context,checkPathBase,recursion){let checkPath=checkPathBase;let componentMatch;if(context.rulePack.getExtension().allAuditableFilePaths.has(checkPath)){const x=context.rulePack.getExtension().allAuditableFilePaths;componentMatch=context.rulePack.getExtension().allAuditableFilePaths.get(checkPath)}else if(checkPath.includes(context.rulePack.getExtension().componentHome)){if(context.rulePack.getExtension().auditableComponentPaths.has(checkPath)){componentMatch=context.rulePack.getExtension().auditableComponentPaths.get(checkPath)}else{const parentPath=this.toJAFPath(path.resolve(checkPath,'../'));componentMatch=this.matchComponentPath(context,parentPath,true)}if(!recursion){context.rulePack.getExtension().allAuditableFilePaths.set(checkPath,componentMatch)}}else{context.rulePack.getExtension().allAuditableFilePaths.set(checkPath)}return componentMatch};Utils.prototype.componentInfo=function(context,componentName){return context.rulePack.getExtension().allComponents.get(componentName)};Utils.prototype.getComponentFullName=function(metadata){return metadata.pack?`${metadata.pack}-${metadata.name}`:metadata.name};Utils.prototype.getComponentType=function(metadata){return metadata.type?metadata.type:'composite'};Utils.prototype.isExpressionString=function(value){if(value){const bindingExpr=/^(?:\[{2})(.*)(?:\]{2})$|^(?:\{{2})(.*)(?:\}{2})$/g;return bindingExpr.test(value.trim())}return false};Utils.prototype.setupFileMethodMapping=function(context,node){const fileName=context.filepath;const withinComponent=this.matchComponentPath(context,path.dirname(fileName));if(withinComponent){if(node.parent&&node.parent.type==='AssignmentExpression'&&node.parent.operator==='='){if(node.parent.left&&node.parent.left.property&&node.parent.left.property.type=='Identifier'&&node.parent.left.property.name){const methodDef={name:node.parent.left.property.name,parameters:node.params?node.params.length:0};this.cacheFileMethod(context,fileName,methodDef)}}else if(node.parent&&node.parent.type==='MethodDefinition'&&node.parent.kind==='method'){if(node.parent.key&&node.parent.key.name){const methodDef={name:node.parent.key.name,parameters:node.params?node.params.length:0};this.cacheFileMethod(context,fileName,methodDef)}}}};Utils.prototype.cacheFileMethod=function(context,filePath,methodDef){if(!context.rulePack.getExtension().allDefinedFileMethods){context.rulePack.getExtension().allDefinedFileMethods=new Map}if(!context.rulePack.getExtension().allDefinedFileMethods.has(filePath)){context.rulePack.getExtension().allDefinedFileMethods.set(filePath,{methods:new Map})}if(!context.rulePack.getExtension().allDefinedFileMethods.get(filePath).methods.has(methodDef.name)){context.rulePack.getExtension().allDefinedFileMethods.get(filePath).methods.set(methodDef.name,methodDef)}};Utils.prototype.deriveViewModels=function(context,node){const fileName=context.filepath;const withinComponent=this.matchComponentPath(context,path.dirname(fileName));const componentInfo=context.rulePack.getExtension().allComponents.get(withinComponent);if(withinComponent&&componentInfo&&componentInfo.type==='composite'&&componentInfo.language==='js'&&!componentInfo.viewModel.resolved&&path.basename(fileName,'.js')==='loader'){const registerInfo=this.getLoaderRegisterInfo(node);if(registerInfo){const vmRelativeFilePath=this._mapVMToImpl(node,registerInfo.viewModel);if(vmRelativeFilePath){const fullVMPath=this.expandPathInContext(context,withinComponent,vmRelativeFilePath);if(fullVMPath){componentInfo.viewModel={path:path.resolve('.',fullVMPath+'.js'),resolved:true,skip:false}}}}}};Utils.prototype.getLoaderRegisterInfo=function(node){let registerInfo;if(node.callee.type='MemberExpression'&&node.callee.object&&node.arguments&&node.arguments.length>0){let isRegister=false;let oldStyle=false;switch(node.callee.object.type){case'Identifier':if(node.callee.object.name==='Composite'){isRegister=this._astPropertyIdentifierName(node.callee,'register')}break;case'MemberExpression':if(node.callee.property&&node.callee.property.type==='Identifier'&&node.callee.property.name==='register'){if(this._astPropertyIdentifierName(node.callee.object,'Composite')){isRegister=node.callee.object.object&&node.callee.object.object.type==='Identifier'&&node.callee.object.object.name==='oj';if(isRegister){oldStyle=true}}}break;}if(isRegister){registerInfo={oldStyle:oldStyle};const tagArg=node.arguments[0];const def=node.arguments[1];registerInfo.tag=tagArg.type==='Literal'?tagArg.value:'?';if(def.type==='ObjectExpression'){vmProp=def.properties.filter(prop=>prop.key.name==='viewModel');if(vmProp.length===1){switch(vmProp[0].value.type){case'Identifier':registerInfo.viewModel=vmProp[0].value.name;break;case'ObjectExpression':if(vmProp[0].value.properties&&vmProp[0].value.properties[0]&&vmProp[0].value.properties[0].key.name==='inline'){registerInfo.viewModel=vmProp[0].value.properties[0].value.name;registerInfo.usesPromises=true}break;case'MemberExpression':if(vmProp[0].value.property&&vmProp[0].value.property.type==='Identifier'){registerInfo.viewModel=vmProp[0].value.object.name;registerInfo.transpiled=true}break;}}const cssCheck=def.properties.filter(prop=>prop.key.name==='css');if(cssCheck.length>0){registerInfo.registerCSS=true}}}}return registerInfo};Utils.prototype._astPropertyIdentifierName=function(node,checkName){return node&&node.property&&node.property.type==='Identifier'&&node.property.name===checkName};Utils.prototype._mapVMToImpl=function(node,vmName){let vmPathDef;if(vmName){let rootNode=node;let defineIndex=this._mapVMToDefineIndex(rootNode,vmName);if(!isNaN(defineIndex)){vmPathDef=this._getDefineStatementElement(node,defineIndex)}else{vmPathDef=this._mapToRequireAssignment(node,vmName)}}return vmPathDef};Utils.prototype._mapVMToDefineIndex=function(node,vmName){let checkNode=node.parent;let defineIndex;let found=false;while(checkNode){if(checkNode.type==='FunctionExpression'&&checkNode.params){for(let i=0;i<checkNode.params.length;i++){if(checkNode.params[i].name===vmName){defineIndex=i;found=true;break}}}if(!found){checkNode=checkNode.parent}else{break}}return defineIndex};Utils.prototype._mapToRequireAssignment=function(node,vmName){let requirePath;const vmDeclNode=this._locateDeclaration(node,vmName);if(vmDeclNode.type==='CallExpression'&&vmDeclNode.callee.type==='Identifier'&&vmDeclNode.callee.name==='require'){if(vmDeclNode.arguments&&vmDeclNode.arguments.length===1&&vmDeclNode.arguments[0].type==='Literal'){requirePath=vmDeclNode.arguments[0].value}}return requirePath};Utils.prototype._getDefineStatementElement=function(node,defineIndex){let checkNode=node.parent;let definePath;while(checkNode){if(checkNode.type==='CallExpression'&&checkNode.callee.name==='define'){if(checkNode.arguments&&checkNode.arguments.length===2){if(checkNode.arguments[0].type==='ArrayExpression'){if(checkNode.arguments[0].elements.length>=defineIndex){definePath=checkNode.arguments[0].elements[defineIndex].value;break}}}}checkNode=checkNode.parent}return definePath};Utils.prototype.expandPathInContext=function(context,componentName,requirePath){let targetPath=requirePath;const parsePluginParts=requirePath.split('!');if(parsePluginParts.length>1){targetPath=parsePluginParts[1]}let pathParts=targetPath.split('/');const decodeRoot=pathParts[0];if(decodeRoot==='.'){pathParts[0]=this.rootPathForComponent(context,componentName)}else{const remotePart=this.rootPathForComponent(context,decodeRoot);if(!remotePart){pathParts=[]}else{pathParts[0]=remotePart}}return pathParts.join('/')};Utils.prototype.rootPathForComponent=function(context,componentName){if(context.rulePack.getExtension().allComponents.has(componentName)){return context.rulePack.getExtension().allComponents.get(componentName).rootFolder}};Utils.prototype.getVMMethodsForLocalComposite=function(context,component){let vmMethods;if(component.local&&component.type==='composite'&&component.language==='js'){if(!component.viewModel.skip){if(!component.viewModel.resolved&&!component.viewModel.warned){console.log(`Warning: unable to derive the correct viewModel implementation for component ${component.fullName}, either your audit run does not include .js files, or you may need to set 'extension.audit.jetwc.viewModel' in the metadata to provide a hint`);component.viewModel.warned=true}else{const rpState=context.rulePack.getExtension();if(rpState.allDefinedFileMethods&&rpState.allDefinedFileMethods.size>0){const vmMethodDef=rpState.allDefinedFileMethods.get(component.viewModel.path);if(vmMethodDef){vmMethods=vmMethodDef.methods}}else{if(!this.noJSWarnDone){console.log('Error: No JavaScript files have been processed. You need to ensure that your audit fileset includes .js, html and .json files to enable all audits in thisC rule-set. Use the ojaf --dryrun command to determine what files are covered by the audit');this.noJSWarnDone=true}}}}}return vmMethods};Utils.prototype.decomposeAssignment=function(assignmentNode){const breakdown=[];this._walkAssignmentNodes(assignmentNode.left,breakdown);if(!breakdown.includes('this')){const parentAssignment=breakdown[breakdown.length-1];const initialAssignmentNode=this._locateDeclaration(assignmentNode,parentAssignment);if(initialAssignmentNode){if(initialAssignmentNode==='<parameter>'){breakdown.push('<parameter>')}else if(initialAssignmentNode.type==='ThisExpression'){breakdown.push('this')}else if(initialAssignmentNode.type==='Identifier'){breakdown.push(initialAssignmentNode.name);const indirectAssignmentNode=this._locateDeclaration(assignmentNode,initialAssignmentNode.name);if(indirectAssignmentNode==='<parameter>'){breakdown.push('<parameter>')}else if(indirectAssignmentNode.type==='ThisExpression'){breakdown.push('this')}}}}return breakdown};Utils.prototype._walkAssignmentNodes=function(node,accumulator){switch(node.type){case'MemberExpression':accumulator.push(node.property.name);if(node.object){this._walkAssignmentNodes(node.object,accumulator)}break;case'Identifier':accumulator.push(node.name);break;case'ThisExpression':accumulator.push('this');break;}};Utils.prototype._locateDeclaration=function(node,searchVariable){let initialAssignment;let workingNode=node;while(!initialAssignment){if(workingNode.body&&workingNode.body.length>0){workingNode.body.forEach(bodyNode=>{if(bodyNode.type==='VariableDeclaration'){bodyNode.declarations.forEach(declNode=>{if(declNode.id.type==='Identifier'&&declNode.id.name===searchVariable){initialAssignment=declNode.init}})}})}else if(workingNode.params&&workingNode.params.length>0){workingNode.params.forEach(paramNode=>{if(paramNode.name===searchVariable){initialAssignment='<parameter>'}})}if(!workingNode.parent){break}else{workingNode=workingNode.parent}}return initialAssignment};Utils.prototype.extractComponentInfoFromJSONFile=function(auditContext,componentFolder,fileName,isLocal){let componentInfo={};const mdFile=this.toJAFPath(path.join(componentFolder,fileName));const compMetadata=auditContext.utils.fsUtils.readJsonSync(mdFile);if(compMetadata!==null){componentInfo.fullName=compMetadata.pack?`${compMetadata.pack}-${compMetadata.name}`:compMetadata.name;componentInfo.pack=compMetadata.pack;componentInfo.name=compMetadata.name;componentInfo.version=compMetadata.version;componentInfo.type=compMetadata.type?compMetadata.type:'composite';componentInfo.local=isLocal;componentInfo.rootFolder=this.toJAFPath(componentFolder);componentInfo.requirePaths=new Set;switch(componentInfo.type){case'reference':if(compMetadata.extension&&compMetadata.extension.oracle&&compMetadata.extension.oracle.businessApprovals){componentInfo.ba=compMetadata.extension.oracle.businessApprovals}if(compMetadata.paths&&compMetadata.paths.name){componentInfo.requirePaths.add(compMetadata.paths.name)}else{const extractPathSegments=compMetadata.package.split('/');if(extractPathSegments.length>1){componentInfo.requirePaths.add(extractPathSegments[1])}else{componentInfo.requirePaths.add(extractPathSegments[0])}}break;case'composite':if(compMetadata.slots){componentInfo.slots=compMetadata.slots}if(compMetadata.properties){componentInfo.properties=compMetadata.properties}if(compMetadata.events){componentInfo.events=compMetadata.events}if(compMetadata.methods&&Object.keys(compMetadata.methods).length>0){componentInfo.methods=compMetadata.methods}componentInfo.viewModel={resolved:false};if(compMetadata&&compMetadata.extension&&compMetadata.extension.audit&&compMetadata.extension.audit.jetwc&&compMetadata.extension.audit.jetwc.hasOwnProperty('viewModel')){const overrideVM=compMetadata.extension.audit.jetwc.viewModel;if(overrideVM){componentInfo.viewModel={path:this.toJAFPath(path.resolve('.',componentInfo.rootFolder,overrideVM)),resolved:true,skip:false}}else{componentInfo.viewModel={skip:true}}}case'resource':componentInfo.requirePaths.add('.');if(compMetadata.pack){componentInfo.requirePaths.add(`${compMetadata.pack}/${compMetadata.name}`)}else{componentInfo.requirePaths.add(compMetadata.name)}if(compMetadata.dependencies){componentInfo.dependencies=Object.keys(compMetadata.dependencies)}break;}return componentInfo}else{console.error(`Error Invalid JSON in component metadata ${mdFile}, component ignored`)}return};Utils.prototype.diagnosticReplacer=function(key,value){if(value instanceof Map){return Array.from(value).map(([vKey,vValue])=>{return{[vKey]:vValue?vValue:''}})}if(value instanceof Set){return Array.from(value)}return value};Utils.prototype.toJAFPath=function(sourcePath){if(this.isWindows){return sourcePath.replace(/\\\\|\\/g,'/')}return sourcePath};Utils.prototype.getDirectoryName=function(filePath){return path.dirname(filePath)};Utils.prototype.shouldIgnoreCheck=function(context,auditName,componentName,scope,target){let ignore=false;const checkComponentDef=context.rulePack.getExtension().allComponents.get(componentName);if(checkComponentDef&&checkComponentDef[scope]){let targetDef;if(target.includes('.')&&scope==='properties'){targetDef=this.getPropertyAttributeFromPath(context,componentName,target)}else{targetDef=checkComponentDef[scope][target==='__default__'?'':target]}if(targetDef.hasOwnProperty('extension')&&targetDef.extension.hasOwnProperty('audit')&&targetDef.extension.audit.hasOwnProperty('ignore')){const ignoreArray=targetDef.extension.audit.ignore;ignore=ignoreArray.includes(auditName)}}return ignore};Utils.prototype.getPropertyAttributeFromPath=function(context,componentName,targetPath,attribute){const checkComponentDef=context.rulePack.getExtension().allComponents.get(componentName);let targetDef;if(checkComponentDef&&checkComponentDef.properties){if(targetPath.includes('.')){const propPath=targetPath.split('.');targetDef=checkComponentDef.properties[propPath[0]];for(let i=1;i<propPath.length;i++){targetDef=targetDef.properties[propPath[i]]}}else{targetDef=checkComponentDef.properties[targetPath]}}if(attribute){return targetDef[attribute]}else{return targetDef}};module.exports=new Utils;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function _find(members,a,index,context){var j,pos,c,data;var member=a[index];for(j=0;j<members.length;j++){if(members[j].name===member){if(index+1>=a.length){pos=members[j].pos;data=context.data;c=data.charAt(pos.index);if(c==="\""||c==="'")pos.index++;return pos}else{return _find(members[j].value.members,a,index+1,context)}}}context.utils.msgLib.assert("helper 'json-prop-pos' failure for '"+a.join(".")+"'")};module.exports=function(context,propName){if(context.suppData.msg){return{line:0,col:0,index:0}}var ast=context.suppData.ast;var members=ast.members;var a,ret,i;var a=propName.split(".");a.forEach(function(v,index){a[index]=a[index].trim()});ret=_find(members,a,0,context);if(!ret){ret={row:0,col:0,index:0}}return ret};
|
package/rules/exch/msgid.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"oj-cca-compjson-file":"0010","oj-cca-compjson-schema":"0030","oj-cca-compjson-prop-undef":"0050","oj-cca-compjson-prop-types":"0060","oj-cca-compjson-prop-types_noprops":"0065","oj-cca-compjson-prop-type":"0070","oj-cca-compjson-prop-version":"0080","oj-cca-compjson-prop-jetver":"0090","oj-cca-compjson-prop-jetver_2":"0095","oj-cca-compjson-evnames":"0110","oj-cca-comp-json-prop-pack":"0120","oj-cca-comp-json-prop-core":"0130","oj-cca-comp-json-prop-reference":"0140","oj-cca-comp-json-prop-resource":"0150","oj-cca-comp-json-prop-vbcs-pattern":"0160","oj-cca-comp-json-prop-vbcs-template":"0170","oj-cca-compjson-prop-obs":"0180","oj-cca-compjson-prop-deps":"0190","oj-cca-comp-zip-expand":"0200","oj-cca-zip-compjson":"0210","oj-cca-comp-zip-content-composite":"0220","oj-cca-comp-zip-content-pack":"0230"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const RULE_NAME="oj-cca-comp-zip-content-composite";const ZIP_README="readme.";const ZIP_LICENSE="license.";const ZIP_FILE_LIST=[ZIP_LICENSE,ZIP_README];function Rule(){};Rule.prototype.getName=function(){return RULE_NAME};Rule.prototype.getShortDescription=function(){return"Web pack zip with a component.json type of 'composite' must contain certain mandatory file entries"};Rule.prototype.getDescription=function(){return"The contents of a web pack zip contains metadata in a component.json file. For component.json with 'type' property 'composite', the zip must contain certain mandatory file entries."};Rule.prototype.register=function(){return{"compjson-composite":function(context,obj){if(context.zipContent&&obj&&!obj.msg){_inspect(context)}}}};function _inspect(context){var zipFiles,file,propVal,name,issue,compJson,i,j;var missing=[];zipFiles=context.zipContent;compJson=context.suppData.obj;for(i=0;i<ZIP_FILE_LIST.length;i++){missing[i]=true}for(i=0;i<ZIP_FILE_LIST.length;i++){for(j=0;j<zipFiles.length;j++){file=zipFiles[j];if(file.isFile){name=file.name.toLowerCase();;if(name.startsWith(ZIP_FILE_LIST[i])){if(!name.endsWith(".md")&&!name.endsWith(".txt")){issue=new context.Issue;issue.setMsg("file '"+file.name+"' is not type 'md' or 'txt'");context.reporter.addIssue(issue,context)}missing[i]=false;break}}}}for(i=0;i<missing.length;i++){if(missing[i]){if(ZIP_FILE_LIST[i]===ZIP_LICENSE){if(typeof compJson.license!=="string"||!compJson.license.length){issue=new context.Issue("LICENSE file is missing");issue.setSeverity("info");context.reporter.addIssue(issue,context)}}else if(ZIP_FILE_LIST[i]===ZIP_README){propVal=context.utils.utils.getProperty(compJson,"extension.catalog.readme");if(typeof propVal!=="string"||!propVal.length){issue=new context.Issue("README file is missing");issue.setSeverity("info");context.reporter.addIssue(issue,context)}}}}};module.exports=Rule;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const RULE_NAME="oj-cca-comp-zip-content-pack";const MANDATORY_TEXT_FILES=["license.","readme."];const LICENSE_INDEX=0;const MANDATORY_NONTEXT_FILES=[];function getName(){return RULE_NAME};function getShortDescription(){return"Web pack zip with a component.json type of 'pack' must contain certain mandatory file entries"};function getDescription(){return"The contents of a web pack zip contains metadata in a component.json file. For component.json with 'type' property 'pack', the zip must contain certain mandatory file entries."};function register(){return{"compjson-pack":function(context,obj){if(context.zipContent&&obj&&!obj.msg){_inspect(context)}}}};function _inspect(context){var files,file,name,issue,index,compJson,i,j;files=context.zipContent;compJson=context.suppData.obj;for(i=0;i<MANDATORY_TEXT_FILES.length;i++){for(j=0;j<files.length;j++){file=files[j];if(file.isFile){name=file.name.toLowerCase();if(name.startsWith(MANDATORY_TEXT_FILES[i])){if(name.endsWith(".md")||name.endsWith(".txt")){break}issue=new context.Issue;issue.setMsg((i===LICENSE_INDEX?"LICENSE":"README")+" file is not type 'md' or 'txt'");context.reporter.addIssue(issue,context);break}}}if(j>=files.length){if(index===LICENSE_INDEX&&compJson.license){continue}issue=new context.Issue((i===LICENSE_INDEX?"LICENSE":"README")+" file not found");issue.setSeverity("info");context.reporter.addIssue(issue,context)}}for(i=0;i<MANDATORY_NONTEXT_FILES.length;i++){for(j=0;j<files.length;j++){file=files[i];if(file.isFile){name=file.name.toLowerCase();if(name.startsWith(MANDATORY_NONTEXT_FILES[i])){break}issue=new context.Issue;issue.setMsg((i===LICENSE_INDEX?"LICENSE":"README")+" file is not type 'md' or 'txt'");context.reporter.addIssue(issue,context);break}}if(j>=files.length){issue=new context.Issue;issue.setMsg("file "+MANDATORY_NONTEXT_FILES[i]+" is missing");context.reporter.addIssue(issue,context)}}};module.exports={getName,getDescription,getShortDescription,register};;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const RULE_NAME="oj-cca-comp-zip-expand";function getName(){return RULE_NAME};function getShortDescription(){return"Custom element zip files must successfuly open and unzip"};function getDescription(){return"A custom component zip must be a valid zip file and be able to be unzipped successfully and its contents extracted."};function register(){return{"file":function(context){var files=context.zipContent;var issue,ret=true;;if(typeof files==="string"){issue=new context.Issue(files);context.reporter.addIssue(issue,context);ret=false}return ret}}};module.exports={getName,getDescription,getShortDescription,register};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const helper=require("./helpers/json-prop-pos");const RULE_NAME="oj-cca-compjson-evnames";const BAD_EVENT_NAMES={abort:true,animationcancel:true,animationend:true,animationiteration:true,animationstart:true,auxclick:true,blur:true,error:true,focus:true,cancel:true,canplay:true,canplaythrough:true,change:true,click:true,close:true,contextmenu:true,cuechange:true,dblclick:true,drag:true,dragend:true,dragenter:true,dragexit:true,dragleave:true,dragover:true,dragstart:true,drop:true,durationchanged:true,empty:true,ended:true,gotpointercapture:true,input:true,invalid:true,keydown:true,keypress:true,keyup:true,load:true,loadeddata:true,loadedmetadata:true,loadend:true,loadstart:true,lostpointercapture:true,mousedown:true,mouseenter:true,mouseleave:true,mousemove:true,mouseout:true,mouseover:true,mouseup:true,mousewheel:true,wheel:true,pause:true,play:true,playing:true,pointerdown:true,pointermove:true,pointerup:true,pointercancel:true,pointerover:true,pointerout:true,pointerenter:true,pointerleave:true,pointerlockchange:true,pointerlockerror:true,progress:true,ratechange:true,reset:true,resize:true,scroll:true,seeked:true,seeking:true,select:true,selectstart:true,selectionchange:true,show:true,sort:true,stalled:true,submit:true,suspend:true,timeupdate:true,volumechange:true,touchcancel:true,touchend:true,touchmove:true,touchstart:true,transitioncancel:true,transitionend:true,waiting:1};function Rule(){};Rule.prototype.getName=function(){return RULE_NAME};Rule.prototype.getShortDescription=function(){return"Event names in a Web Component component.json metadata file must not conflict with HTML global event handlers"};Rule.prototype.getDescription=function(){return"The metadata for a web component is contained in an associated component.json file. Event names, which become 'on<name>' attributes at runtime, must not conflict with HTML GlobalEventHandlers."};Rule.prototype.register=function(){return{"compjson":function(context,obj){if(obj.msg){return}var o=obj.obj.component?obj.obj.component:obj.obj;if(o.events){this._validateEventNames(context,o)}}}};Rule.prototype._validateEventNames=function(context,obj){var events,eventName,issue,pos;events=obj.events;for(eventName in events){if(BAD_EVENT_NAMES[eventName.toLowerCase()]){issue=new context.Issue("'"+eventName+"' - event name is not permitted and must be renamed");pos=helper(context,"events."+eventName);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+eventName.length-1:0);context.reporter.addIssue(issue,context)}}};module.exports=Rule;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const RULE_NAME="oj-cca-compjson-file";const COMPONENT_JSON="component.json";function getName(){return RULE_NAME};function getShortDescription(){return"Web component metadata file component.json must be syntactically correct"};function getDescription(){return"The metadata for a web component (in its component.json file) must be well-formed JSON (i.e. syntactically valid)."};function register(){return{"file":function(context){if(context.filename.indexOf(COMPONENT_JSON)<0){return true}if(context.suppData.msg){var issue;issue=new context.Issue(COMPONENT_JSON+" : "+context.suppData.msg);issue.setPosition(context.suppData.line,context.suppData.col);context.reporter.addIssue(issue,context);return false}}}};module.exports={getName,getDescription,getShortDescription,register};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const helper=require("./helpers/json-prop-pos");const RULE_NAME="oj-cca-compjson-prefix";function getName(){return RULE_NAME};function getShortDescription(){return"component.json 'name property must not start with 'oj-' if not a JET component'"};function getDescription(){return"If the component metadata (component.json) defines a non-JET core component, its 'name' property must not start with reserved prefix 'oj-'"};function register(){return{"compjson":function(context,obj){var compType,name,issue,pos;compType=obj.obj.type||"composite";name=obj.obj.name;if(typeof compType!=="string"||typeof name!=="string"){return}compType=compType.toLowerCase();if(name.toLowerCase().startsWith("oj-")&&compType!=="core"&&compType!=="pack"){issue=new context.Issue("'name' property cannot start with reserved prefix 'oj-' since 'type' property is not 'core'");pos=helper(context,"name");issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+3:0);context.reporter.addIssue(issue,context)}}}};module.exports={getName,getDescription,getShortDescription,register};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const helper=require("./helpers/json-prop-pos");const RULE_NAME="oj-cca-compjson-prop-compdeps";const COMPOSITE_DEPENDENCIES="compositeDependencies";const ROLES="roles";function Rule(){};Rule.prototype.getName=function(){return RULE_NAME};Rule.prototype.getShortDescription=function(){return"Web component 'component.json' metadata property 'compositeDependencies' is obsolete"};Rule.prototype.getDescription=function(){return"The metadata for a web component is contained in an associated component.json file. The metadata property 'compositeDependencies is obsolete, and should be replaced with 'dependencies'."};Rule.prototype.register=function(){return{"compjson":function(context,obj){var issue,prop,pos;if(obj.obj.compositeDependencies){issue=new context.Issue("property 'compositeDependencies' is obsolete - replace with 'dependencies'");prop=COMPOSITE_DEPENDENCIES}else if(obj.obj.roles){issue=new context.Issue("property 'roles' is obsolete!");prop=ROLES}if(issue){pos=helper(context,prop);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+prop.length-1:0);context.reporter.addIssue(issue,context)}}}};module.exports=Rule;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const path=require("path");const fs=require("fs");const helper=require("./helpers/json-prop-pos");const RULE_NAME="oj-cca-compjson-prop-deps";const SHORT="component.json 'dependencies' property must be valid' and the dependencies must be defined";const LONG="If the component metadata specifies a 'dependencies' property, then it must contain valid semantic versions for each dependency it defines, and the dependency must exist.<p>Refer to <a href=\"https://confluence.oraclecorp.com/confluence/display/JET/JET+Component+Metadata+spec\">Component Metadata spec</a>.";function Rule(){};Rule.prototype.getName=function(){return RULE_NAME};Rule.prototype.getShortDescription=function(){return SHORT};Rule.prototype.getDescription=function(){return LONG};Rule.prototype.register=function(regCtx){return{"compjson":function(context,obj){var deps,dep,semver,issue,pos,runMode;deps=obj.obj.dependencies;if(typeof deps==="undefined"){return}runMode=context.utils.jafLib.getRunMode();for(dep in deps){semver=deps[dep];if(!context.utils.semVerUtils.isValidRange(semver)){issue=new context.Issue("dependencies : "+dep+" : '"+semver+"' is not a valid semantic version/range");pos=helper(context,"dependencies."+dep);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+dep.length-1:0);context.reporter.addIssue(issue,context);continue}if(runMode!=="amd"){issue=_checkDependencyExists(context,obj.obj,dep,semver);if(issue){pos=helper(context,"dependencies."+dep);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+dep.length-1:0);context.reporter.addIssue(issue,context);continue}}}}}};function _checkDependencyExists(context,obj,dep,depSemVer){var fpath,json,comp,compName,remover;remover=obj.name+"-";compName=dep.replace(remover,"");fpath=path.dirname(context.filepath);try{json=fs.readFileSync(path.join(fpath,dep.replace(remover,""),"component.json"),"utf8")}catch(e){}if(!json){return new context.Issue("Cannot locate '"+obj.name+"' dependency '"+dep+"' ")}try{comp=JSON.parse(json)}catch(e){}if(!comp){return new context.Issue("Cannot locate '"+obj.name+"' dependency '"+dep+"' - component.json cannot be parsed")}if(comp.name!==compName){return new context.Issue("Cannot locate '"+obj.name+"' dependency '"+dep+"' version '"+obj.version+"'. Name property is not '"+compName+"'")}if(!context.utils.semVerUtils.satisfiesRange(depSemVer,comp.version)){return new context.Issue("Cannot match '"+obj.name+"' dependency '"+dep+"' version '"+obj.version+"' with pack dependency version '"+depSemVer+"'")}};module.exports=Rule;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const helper=require("./helpers/json-prop-pos");const RULE_NAME="oj-cca-compjson-prop-jetver";const PROPNAME="jetVersion";const PROPNAME_LC="jetversion";const SHORT="Custom element component.json metadata must contain a valid jetVersion property";const LONG="The metadata for a custom element is contained in an associated <b><i>component.json</i></b> file. The metadata json must contain a valid 'semantic Version' value for the property 'jetVersion'.<p>For more information on semantic versioning, please refer to the <a href='https://semver.org'>Semantic Version Org</a>";function Rule(){};Rule.prototype.getName=function(){return RULE_NAME};Rule.prototype.getShortDescription=function(){return SHORT};Rule.prototype.getDescription=function(){return LONG};Rule.prototype.register=function(regCtx){this._jetVers=_makeVersionList(regCtx);return{"compjson":function(context,obj){this._handle(context,obj)}}};Rule.prototype._handle=function(ruleCtx,obj){var json=obj.obj;var typeProp,issue,pos,i;var propJetVer=_checkSpecified(json);var valJetVer;if(!propJetVer){return}typeProp=json.type||"composite";if(typeProp==="reference"||typeProp==="vbcs-pattern"||typeProp==="vbcs-template"||typeProp==="pack"){issue=new ruleCtx.Issue("'jetVersion' property is not applicable for type '"+typeProp+"'");issue.setSeverity("info");pos=helper(ruleCtx,propJetVer);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+propJetVer.length-1:0);if(typeProp==="pack"){issue.setSeverity("info")}ruleCtx.reporter.addIssue(issue,ruleCtx);return}valJetVer=json[propJetVer];if(!ruleCtx.utils.semVerUtils.isValidRange(valJetVer)){issue=new ruleCtx.Issue("component.json 'jetVersion' property '"+valJetVer+"' is not a valid semantic version/range");ruleCtx.reporter.addIssue(issue,ruleCtx);pos=helper(ruleCtx,propJetVer);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+propJetVer.length-1:0);issue.setMsgKey(RULE_NAME+"_1");return}for(i=0;i<this._jetVers.length;i++){if(ruleCtx.utils.semVerUtils.satisfiesRange(this._jetVers[i],valJetVer)){break}}if(i>=this._jetVers.length){issue=new ruleCtx.Issue("component.json 'jetVersion' property '"+valJetVer+"' does not satisfy a currently supported JET version");pos=helper(ruleCtx,propJetVer);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+9:0);ruleCtx.reporter.addIssue(issue,ruleCtx)}};function _checkSpecified(json){if(json.jetVersion){return PROPNAME}var names,name,i,len;names=Object.keys(json);len=names.length;for(i=0;i<len;i++){name=names[i];if(name.toLowerCase()===PROPNAME_LC){return name}}return false};function _makeVersionList(regCtx){var o=regCtx.utils.metaLib.getMetaVers();return Object.keys(o.versions).sort()};module.exports=Rule;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const helper=require("./helpers/json-prop-pos");const RULE_NAME="oj-cca-compjson-prop-obs";const COMPOSITE_DEPENDENCIES="compositeDependencies";const ROLES="roles";function getName(){return RULE_NAME};function getShortDescription(){return"Web component 'component.json' metadata must not contain obsolete properties"};function getDescription(){return"Component metadata (component.json) properties that are considered obsolete, should not be used.<p>Refer to the <a href=\"https://confluence.oraclecorp.com/confluence/display/JET/JET+Component+Metadata+spec\">Component Metadata spec</a> for details."};function register(){return{"compjson":function(context,obj){var issue,prop,pos;if(obj.obj.compositeDependencies){issue=new context.Issue("property 'compositeDependencies' is obsolete - replace with 'dependencies'");prop=COMPOSITE_DEPENDENCIES}else if(obj.obj.roles){issue=new context.Issue("property 'roles' is obsolete!");prop=ROLES}if(issue){pos=helper(context,prop);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+prop.length-1:0);context.reporter.addIssue(issue,context)}}}};module.exports={getName,getDescription,getShortDescription,register};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const helper=require("./helpers/json-prop-pos");const RULE_NAME="oj-cca-compjson-prop-type";const TYPES=["composite","core","pack","reference","resource","vbcs-pattern","vbcs-template"];function getName(){return RULE_NAME};function getShortDescription(){return"Web component metadata file component.json must contain a valid 'type' property"};function getDescription(){return"The metadata for a web component is contained in a component.json file. The 'type' property must have a valid value (for example, <b><i>composite</i></b>."};function register(){let type,issue,pos;return{"compjson":function(context){if(context.suppData.msg){return}type=context.suppData.obj.type;if(!type){}else if(TYPES.indexOf(type)<0){issue=new context.Issue("invalid 'type' property '"+type+"'");pos=helper(context,"type");issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+3:0);context.reporter.addIssue(issue,context)}}}};module.exports={getName,getDescription,getShortDescription,register};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const helper=require("./helpers/json-prop-pos");const RULE_NAME="oj-cca-compjson-prop-types";const SCHEMA={name:{ptype:"string"},version:{ptype:"string"},jetVersion:{ptype:"string"},properties:{ptype:"object",hasName:true,props:{enumValues:{ptype:"array",atype:"string"},properties:{ptype:"object",hasName:true,recurse:"properties"},readOnly:{ptype:"boolean"},type:{ptype:"string"},value:{ptype:"object | array | string | number | boolean | null"},writeback:{ptype:"boolean"},description:{ptype:"string"},displayName:{ptype:"string"},eventGroup:{ptype:"string"},exclusiveMaximum:{ptype:"number | string"},exclusiveMinimum:{ptype:"number | string"},extension:{ptype:"object"},format:{ptype:"string"},help:{ptype:"string"},maximum:{ptype:"number | string"},minimum:{ptype:"number | string"},pattern:{ptype:"string"},placeHolder:{ptype:"string"},propertyEditorValues:{ptype:"object",hasName:true,props:{description:{ptype:"string"},displayName:{ptype:"string"},icon:{ptype:"object",props:{iconPath:{ptype:"string"},selectedIconPath:{ptype:"string"},hoverIconPath:{ptype:"string"}}}}},propertyGroup:{ptype:"string"},required:{ptype:"boolean"},translatable:{ptype:"boolean"},units:{ptype:"string"},visible:{ptype:"boolean"}}},methods:{ptype:"object",hasName:true,props:{internalName:{ptype:"string"},description:{ptype:"string"},displayName:{ptype:"string"},extension:{ptype:"object"},help:{ptype:"string"},params:{ptype:"array",atype:"object",props:{description:{ptype:"string"},name:{ptype:"string"},type:{ptype:"string"}}},return:{ptype:"string"},visible:{ptype:"boolean"}}},events:{ptype:"object",hasName:true,props:{bubbles:{ptype:"boolean"},cancelable:{ptype:"boolean"},description:{ptype:"string"},detail:{ptype:"object",hasName:true,props:{description:{ptype:"string"},type:{ptype:"string"},eventGroup:{ptype:"string"}}},displayName:{ptype:"string"},eventGroup:{ptype:"string"},extension:{ptype:"object"},help:{ptype:"string"},visible:{ptype:"boolean"}}},slots:{ptype:"object",hasName:true,props:{data:{ptype:"object",hasName:true,props:{description:{ptype:"string"},type:{ptype:"string"}}},description:{ptype:"string"},displayName:{ptype:"string"},extension:{ptype:"object"},help:{ptype:"string"},maxItems:{ptype:"number"},manItems:{ptype:"number"},visible:{ptype:"boolean"}}},dependencies:{ptype:"object",hasName:true,ntype:"string"},description:{ptype:"string"},displayName:{ptype:"string"},extension:{ptype:"object",props:{catalog:{ptype:"object",props:{category:{ptype:"string"},coverImage:{ptype:"string"},extraInfo:{ptype:"object"},screenshots:{ptype:"object"},tags:{ptype:"array",atype:"string"}}},vbcs:{ptype:"object"},vbdt:{ptype:"object"}}},help:{ptype:"string"},icon:{ptype:"object",props:{iconPath:{ptype:"string"},selectedIconPath:{ptype:"string"},hoverIconPath:{ptype:"string"}}},license:{ptype:"string"},pack:{ptype:"string"},paths:{ptype:"object | array",atype:"object",props:{cdn:{ptype:"object",props:{min:{ptype:"string"},debug:{ptype:"string"}}},npm:{ptype:"object",props:{min:{ptype:"string"},debug:{ptype:"string"}}},name:{ptype:"string"}}},propertyLayout:{ptype:"array",atype:"object",props:{propertyGroup:{ptype:"string"},displayName:{ptype:"string"},items:{ptype:"array",atype:"string | object"}}},styleClasses:{ptype:"array",atype:"object",props:{styleGroup:{ptype:"array",atype:"string"},description:{ptype:"string"}}},type:{ptype:"string"},bundles:{ptype:"object",hasName:true,ntype:"array",natype:"string"},package:{ptype:"string"}};const RESERVED_NAMES=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];const ILLEGAL_PROPERTIES_NAMES=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","lang","spellcheck","style","tabindex","title","translate"];function Rule(){};Rule.prototype.getName=function(){return RULE_NAME};Rule.prototype.getShortDescription=function(){return"Properties in a Web Component component.json metadata file must have the correct type"};Rule.prototype.getDescription=function(){return"The metadata for a web component is contained in an associated component.json file. The property and value data types in the metadata must conform to the <a href=\"https://confluence.oraclecorp.com/confluence/display/JET/JET+Component+Metadata+spec\">Component Metadata spec</a>."};Rule.prototype.register=function(){return{"compjson":function(context,obj){if(obj.msg){return}var o=obj.obj.component?obj.obj.component:obj.obj;if(this._hasProperties(context,o)){this._level=-1;this._parents=[];this._json=o;this._validateObjPropTypes(context,o,SCHEMA)}}}};Rule.prototype._validateObjPropTypes=function(context,obj,propTab){var propNames,prop,issue,pos,i;var userProp,propType,fullPropName;var utils=context.utils.utils;this._level++;propNames=Object.keys(obj);for(i=0;i<propNames.length;i++){prop=propNames[i];fullPropName=this._getFullPropName(prop);if(!propTab[prop]){this._handleUnknownProp(context,propTab,prop);continue}if(!this._testPropType(context,obj,prop,propTab)){continue}propType=utils.getType(this._getPropValueByPath(fullPropName));if(propType==="array"&&propTab[prop].atype){this._checkArrayElemsType(context,obj[prop],propTab[prop].atype,fullPropName);if(propTab[prop].atype==="object"){this._checkArrayObjects(context,obj,prop,propTab[prop])}else{this._handleSpecialNonObjCases(context,prop,obj[prop])}}else if(propType==="object"){if(propTab[prop].hasName){this._parents.push(prop);for(userProp in obj[prop]){if(prop==="properties"){this._checkLegalPropNames(context,this._getFullPropName(userProp),userProp)}propType=utils.getType(obj[prop][userProp]);if(propTab[prop].ntype){if(propTab[prop].ntype==="array"){this._checkArrayElemsType(context,obj[prop][userProp],propTab[prop].natype,this._getFullPropName(userProp))}}else if(propType!=="object"){issue=new context.Issue("'"+this._getFullPropName(userProp)+"' has invalid type ("+propType+") - expected object");pos=helper(context,this._getFullPropName(userProp));issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+userProp.length-1:0);context.reporter.addIssue(issue,context);continue}this._parents.push(userProp);if(propTab[prop].props){this._validateObjPropTypes(context,obj[prop][userProp],propTab[prop].props)}else if(propTab[prop].recurse){this._validateObjPropTypes(context,obj[prop][userProp],_getSchemaObjByPath(propTab[prop].recurse))}this._parents.pop();this._level--}this._parents.pop()}else{this._parents.push(prop);propType=utils.getType(obj[prop]);if(propType!=="object"){issue=new context.Issue(this._getFullPropName()+" has invalid type ("+propType+") - expected object");pos=helper(context,this._getFullPropName());issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+prop.length-1:0);context.reporter.addIssue(issue,context);this._parents.pop();continue}this._handleSpecialObjCases(context,obj[prop]);if(propTab[prop].props){this._validateObjPropTypes(context,obj[prop],propTab[prop].props)}else if(propTab[prop].recurse){this._validateObjPropTypes(context,obj[prop],_getSchemaObjByPath(propTab[prop].recurse))}this._parents.pop();this._level--}}else{this._handleSpecialNonObjCases(context,prop,obj[prop])}}};Rule.prototype._testPropType=function(context,json,propName,propTab){var propType,propTypes,j,pos,issue,fullPropName;propType=context.utils.utils.getType(json[propName]);if(propName==="value"){if(!json.type){return true}propTypes=_split(json.type,"|")}else{propTypes=_split(propTab[propName].ptype,"|")}if(propTypes.length===1&&propTypes[0]==="*"){return true}for(j=0;j<propTypes.length;j++){if(propType===propTypes[j]){return true}}fullPropName=this._getFullPropName(propName);if(propName==="value"){issue=new context.Issue("'"+fullPropName+"' type ("+propType+") conflicts with "+this._getFullPropName()+".type ("+_makeTypeList(propTypes)+")")}else{issue=new context.Issue("'"+fullPropName+"' has invalid type ("+propType+") - expected "+_makeTypeList(propTypes))}pos=helper(context,fullPropName);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+propName.length-1:0);context.reporter.addIssue(issue,context);return false};Rule.prototype._checkArrayObjects=function(context,obj,prop,propTab){var jj=42};Rule.prototype._handleSpecialObjCases=function(context,obj){var propName,fullPropName,issue,pos;if(this._matchPath("extension.catalog.screenshots")){for(propName in obj){if(typeof obj[propName]!=="string"){fullPropName=this._getFullPropName();issue=new context.Issue(fullPropName+" entry \""+propName+"\" is not type 'string'");pos=helper(context,this._getFullPropName(propName));issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+propName.length-1:0);context.reporter.addIssue(issue,context)}}}if(this._matchPath("paths")){if(this._json.pack){issue=new context.Issue("'paths' is not applicable if 'pack' property is specified");issue.setSeverity("info");pos=helper(context,"paths");issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+"paths".length-1:0);context.reporter.addIssue(issue,context)}}};Rule.prototype._handleSpecialNonObjCases=function(context,prop,val){var fullPropName,value,x,temp,issue,pos;if(typeof val==="string"){fullPropName=this._getFullPropName();if(fullPropName.startsWith("properties.")){this._parents.push(prop);if(this._matchPath("properties.*.exclusiveMaximum")||this._matchPath("properties.*.exclusiveMinimum")||this._matchPath("properties.*.maximum")||this._matchPath("properties.*.minimum")){if(isNaN(Date.parse(val))){fullPropName=this._getFullPropName();issue=new context.Issue(fullPropName+" is an invalid date (ISO 8601 Extended)");pos=helper(context,fullPropName);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+prop.length-1:0);context.reporter.addIssue(issue,context)}}this._parents.pop()}}if(prop==="enumValues"){fullPropName=this._getFullPropName();if(fullPropName.startsWith("properties.")){value=this._getPropValueByPath(fullPropName+".value");if(value!==undefined){if(val.indexOf(value)<0){issue=new context.Issue(fullPropName+".value is not contained within "+fullPropName+".enumValues");pos=helper(context,fullPropName+".value");issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+4:0);context.reporter.addIssue(issue,context)}}}}if(prop==="pattern"){var re;try{re=new RegExp(val)}catch(e){}if(!re){fullPropName=this._getFullPropName(prop);issue=new context.Issue(fullPropName+" is not a valid regular expression");pos=helper(context,fullPropName);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+prop.length-1:0);context.reporter.addIssue(issue,context)}}if(prop==="pack"&&this._json.type==="pack"){fullPropName=this._getFullPropName(prop);issue=new context.Issue("'pack' property should not be specified if 'type' property value is 'pack'");pos=helper(context,fullPropName);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+prop.length-1:0);context.reporter.addIssue(issue,context)}if((prop==="min"||prop==="debug")&&this._matchPath("paths.cdn")){if(val.startsWith("http:")){fullPropName=this._getFullPropName(prop);issue=new context.Issue(fullPropName+" use of 'https' strongly recommended");issue.setSeverity("info");pos=helper(context,fullPropName);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+prop.length-1:0);context.reporter.addIssue(issue,context)}}if(prop==="name"&&this._matchPath()){if(!/^[0-9a-z_\-]+$/.test(val)){issue=new context.Issue("property 'name' value '"+val+"' contains invalid characters")}else if(RESERVED_NAMES.indexOf(val)>=0){issue=new context.Issue("property 'name' value '"+val+"' is a reserved name and must be changed")}if(issue){pos=helper(context,prop);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+prop.length-1:0);context.reporter.addIssue(issue,context)}if(!/[a-z]/.test(val.substr(0,1))){if(/[A-Z]/.test(val.substr(0,1))){issue=new context.Issue("'name' ("+val+") starting character must be lowercase")}else{issue=new context.Issue("'name' ("+val+") invalid starting character")}pos=helper(context,prop);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+prop.length-1:0);context.reporter.addIssue(issue,context)}if(!this._json.pack){x=val.indexOf("-");if(x<0){issue=new context.Issue("'name' ("+val+") does not contain at least one hyphen");pos=helper(context,prop);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+prop.length-1:0);context.reporter.addIssue(issue,context)}else{if(val.indexOf("--")>=0||val.indexOf("__")>=0){issue=new context.Issue("'name' ("+val+") contains consecutive hyphens/underscores");pos=helper(context,prop);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+prop.length-1:0);context.reporter.addIssue(issue,context)}if(this._json.type!=="core"&&this._json.type!=="pack"&&val.substring(0,x)==="oj"&&!context.utils.metaLib.isNamespacePrefix(val)){issue=new context.Issue("'name' ("+val+") cannot use prefix 'oj-' - reserved for JET core web components");pos=helper(context,prop);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+prop.length-1:0);context.reporter.addIssue(issue,context)}if(val.substr(x+1).length<1){issue=new context.Issue("'name' ("+val+") : at leat one character following the first hyphen required");pos=helper(context,prop);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+prop.length-1:0);context.reporter.addIssue(issue,context)}}}}if(prop==="required"){fullPropName=this._getFullPropName();if(fullPropName.startsWith("properties")){if(context.utils.utils.getType(this._getPropValueByPath(fullPropName+"."+"value"))!=="undefined"){if(this._getPropValueByPath(fullPropName+"."+prop)){issue=new context.Issue("'"+fullPropName+".required' cannot be specified as true, if 'value' is defined");pos=helper(context,fullPropName+"."+prop);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+prop.length-1:0);context.reporter.addIssue(issue,context)}}}}if(prop==="package"){if(this._level===0){if(this._json.type!=="reference"){issue=new context.Issue("'package' is only applicable for type 'reference'");issue.setSeverity("info");pos=helper(context,prop);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+prop.length-1:0);context.reporter.addIssue(issue,context)}}}};Rule.prototype._handleUnknownProp=function(context,propTab,prop){var propCase,issue,pos,fullPropName,fullPath;fullPropName=this._getFullPropName(prop);fullPath=this._getFullPropName();propCase=_incorrectCase(propTab,prop);if(propCase){issue=new context.Issue("'"+fullPropName+"' wrong case - use "+propCase)}else if((prop==="compositeDependencies"||prop==="roles")&&fullPath.length===0){return}else if(fullPath==="extension"){return}else{issue=new context.Issue("unexpected property '"+fullPropName+"'")}pos=helper(context,fullPropName);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+prop.length-1:0);context.reporter.addIssue(issue,context)};Rule.prototype._checkLegalPropNames=function(context,fullPropName,propName){var issue,pos,x;x=ILLEGAL_PROPERTIES_NAMES.indexOf(propName.toLowerCase());if(x>=0){issue=new context.Issue("'"+fullPropName+"' is an illegal name and cannot be used");pos=helper(context,fullPropName);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+propName.length-1:0);context.reporter.addIssue(issue,context)}return x<0};Rule.prototype._checkArrayElemsType=function(context,ar,elemType,fullPropName){var types,type,i,issue,pos;types=_split(elemType,"|");for(i=0;i<ar.length;i++){type=context.utils.utils.getType(ar[i]);if(types.indexOf(type)<0){issue=new context.Issue("Array "+fullPropName+"["+i+"] has invalid type ('"+type+"') - expected "+_makeTypeList(elemType));pos=helper(context,fullPropName);issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+fullPropName.length-1:0);context.reporter.addIssue(issue,context)}}};Rule.prototype._getFullPropName=function(propName){var i,len,s="";len=this._parents.length;for(i=0;i<len;i++){s+=this._parents[i]+(i+1<len?".":"")}return s+(propName?(len>0?".":"")+propName:"")};Rule.prototype._hasProperties=function(context,obj){var prop,issue,ret=false;for(var prop in obj){if(obj.hasOwnProperty(prop)){ret=true;break}}if(!ret){issue=new context.Issue("component.json contains no properties!");issue.setMsgKey(RULE_NAME+"_noprops");context.reporter.addIssue(issue,context)}return ret};Rule.prototype._matchPath=function(pattern){var i,pat,path;pat=pattern?_split(pattern,"."):[];path=this._parents;if(pat.length!==path.length){return false}for(i=0;i<path.length;i++){if(pat[i]!=="*"){if(pat[i]!==path[i]){break}}}return i>=pat.length};Rule.prototype._getPropValueByPath=function(path){var a,i,ret=this._json;a=_split(path,".");for(i=0;i<a.length;i++){ret=ret[a[i]]}return ret};function _getSchemaObjByPath(path){var a,i,ret=SCHEMA;a=path.split(".");for(i=0;i<a.length;i++){ret=ret[a[i]].props}return ret};function _split(s,sep){var a=s.split(sep);a.forEach(function(val,index){a[index]=a[index].trim()});return a};function _makeTypeList(ar){var quote=ar.length>1?"'":"";return quote+ar.join(" | ")+quote};function _incorrectCase(props,propName){var prop,ret=false;var lcPropName=propName.toLowerCase();for(prop in props){if(prop.toLowerCase()===lcPropName){ret=prop;break}}return ret};module.exports=Rule;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const RULE_NAME="oj-cca-compjson-prop-undef";const PROP_NAMES={name:"name",description:"description",displayname:"displayName",type:"type",version:"version",jetversion:"jetVersion",package:"package",dependencies:"dependencies"};var _parents=[];function Rule(){};Rule.prototype.getName=function(){return RULE_NAME};Rule.prototype.getShortDescription=function(){return"Custom element component.json metadata must contain mandatory properties"};Rule.prototype.getDescription=function(){return"The web component metadata JSON must contain all mandatory properties. Refer to the <a href=\"https://confluence.oraclecorp.com/confluence/display/JET/JET+Component+Metadata+spec\">Component Medata spec</a>"};Rule.prototype.register=function(){return{"compjson":function(context,obj){this._handle(context,obj)}}};Rule.prototype._handle=function(context,obj){var json=obj.obj;this._parents=[];this._handleTopLevel(context,json);this._handleProperties(context,json,json.properties)};Rule.prototype._handleTopLevel=function(context,json){var propNames,lcProp,propCase,propMap,propType,issue;propType=json.type;propMap={};propNames=Object.keys(json);propNames.forEach(function(val,index){lcProp=val.toLowerCase();propCase=PROP_NAMES[lcProp];if(propCase){propMap[lcProp]=val}});if(!json.name){if(propMap.name){}else{issue=new context.Issue("'name' property is missing");issue.setPosition(0,0,0,0);context.reporter.addIssue(issue,context)}}if(!json.description){if(propMap.description){}else{issue=new context.Issue("'description' property is missing");issue.setSeverity("info");issue.setPosition(0,0,0,0);context.reporter.addIssue(issue,context)}}if(!json.displayName){if(propMap.displayname){}else{issue=new context.Issue("'displayName' property not specified");issue.setSeverity("info");issue.setPosition(0,0,0,0);context.reporter.addIssue(issue,context)}}if(!json.type){if(propMap.type){}else{issue=new context.Issue("'type' property defaulting to 'composite'");issue.setSeverity("info");issue.setPosition(0,0,0,0);propType="composite";context.reporter.addIssue(issue,context)}}if(!json.version){if(propMap.version){}else{issue=new context.Issue("'version' property is missing");issue.setPosition(0,0,0,0);context.reporter.addIssue(issue,context)}}if(!json.jetVersion){if(propType!=="reference"&&propType!=="vbcs-pattern"&&propType!=="vbcs-template"&&propType!=="pack"){if(propMap.jetversion){}else{issue=new context.Issue("'jetVersion' property is required for type "+propType);context.reporter.addIssue(issue,context)}}}if(!json.package&&json.type==="reference"){if(propMap.package){}else{issue=new context.Issue("'package' property is required for type 'reference'");context.reporter.addIssue(issue,context)}}if(!json.dependencies&&json.type==="pack"){if(propMap.dependencies){}else{issue=new context.Issue("'dependencies' property is required for type 'pack'");context.reporter.addIssue(issue,context)}}};Rule.prototype._handleProperties=function(context,json,obj){var props,propName,issue;if(!json.properties){return}this._parents.push("properties");for(propName in obj){props=obj[propName];if(!props.type){this._parents.push(propName);issue=new context.Issue("mandatory property '"+this._getFullPropName("type")+"' is missing");issue.setPosition(0,0,0,0);context.reporter.addIssue(issue,context)}if(props.properties){this._handleProperties(context,json,props.properties)}this._parents.pop()}_parents.pop()};Rule.prototype._getFullPropName=function(propName){var i,len,s="";len=this._parents.length;for(i=0;i<len;i++){s+=this._parents[i]+(i+1<len?".":"")}return s+(propName?(len>0?".":"")+propName:"")};module.exports=Rule;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const helper=require("./helpers/json-prop-pos");const RULE_NAME="oj-cca-compjson-prop-version";function getName(){return RULE_NAME};function getShortDescription(){return"Custom element component.json metadata must contain a valid version property"};function getDescription(){return"The metadata for a custom element is contained in an associated <b><i>component.json</i></b> file. The metadata json must contain a valid 'semantic Version' value for the property 'version'.<p>For more information on semantic versioning, please refer to the <a href='https://semver.org'>Semantic Version Org</a>"};function register(){return{"compjson-composite":function(context,obj){_handle(context,obj)}}};function _handle(ruleCtx,obj){var json=obj.obj;var issue,pos;if(json.version){if(!ruleCtx.utils.semVerUtils.isValid(json.version)){issue=new ruleCtx.Issue("component.json 'version' property '"+json.version+"' is not a valid semantic version");pos=helper(ruleCtx,"version");issue.setPosition(pos.row,pos.col,pos.index,pos.index?pos.index+6:0);ruleCtx.reporter.addIssue(issue,ruleCtx)}}};module.exports={getName,getDescription,getShortDescription,register};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const RULE_NAME="oj-cca-compjson-schema";function getName(){return RULE_NAME};function getShortDescription(){return"Custom element component.json metadata must be valid"};function getDescription(){return"The metadata for a web component (in its component.json file) must pass validation using the built-in metadata schema."};function register(){return{"compjson":_applySchema}};function _applySchema(context,obj){var errs,i,o,issue;if(obj.msg){issue=new context.Issue(obj.msg);context.reporter.addIssue(issue,context);return}o=obj.obj.component?obj.obj.component:obj.obj;errs=context.utils.metaLib.applySchema(o);if(errs){for(i=0;i<errs.length;i++){issue=new context.Issue("component.json schema violation : "+errs[i].msg);context.reporter.addIssue(issue,context)}}};module.exports.getName=getName;module.exports.getDescription=getDescription;module.exports.getShortDescription=getShortDescription;module.exports.register=register;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const RULE_NAME="oj-cca-zip-compjson";const COMPONENT_JSON="component.json";function getName(){return RULE_NAME};function getShortDescription(){return"Web component zip files must contain a 'component.json' file"};function getDescription(){return"A Web Component zip is required to contain a 'component.json' metadata file. This file is mandatory!<p>Refer to the <a href=\"https://confluence.oraclecorp.com/confluence/display/JET/JET+Component+Metadata+spec\">Component Metadata spec</a> for details."};function register(){return{"file":function(context){var objs=context.zipContent;var obj,i,issue;if(!Array.isArray(objs)){return true}for(i=0;i<objs.length;i++){obj=objs[i];if(obj.isFile&&COMPONENT_JSON===obj.name.toLowerCase()){break}}if(i>=objs.length){issue=new context.Issue("mandatory zip file entry '"+COMPONENT_JSON+"' not found");context.reporter.addIssue(issue,context)}return!issue}}};module.exports.getName=getName;module.exports.getDescription=getDescription;module.exports.getShortDescription=getShortDescription;module.exports.register=register;
|
package/rules/exch/rules.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"title":"JET Builtin Exchange Rules","version":"1.0.3","prefix":"EXCH","rules":{"oj-cca-comp-zip-expand":{"severity":"critical","filetype":"zip","group":"jet-cca","status":"ready"},"oj-cca-zip-compjson":{"severity":"critical","filetype":"zip","group":"jet-cca","status":"ready"},"oj-cca-comp-zip-content-composite":{"severity":"critical","filetype":"json","group":"jet-cca","status":"ready"},"oj-cca-comp-zip-content-pack":{"severity":"critical","filetype":"json","group":"jet-cca","status":"ready"},"oj-cca-compjson-file":{"severity":"critical","filetype":"json","group":"jet-cca","status":"ready"},"oj-cca-compjson-schema":{"severity":"critical","filetype":"json","group":"jet-cca","status":"ready"},"oj-cca-compjson-prop-types":{"severity":"blocker","filetype":"json","group":"jet-cca","status":"ready"},"oj-cca-compjson-evnames":{"severity":"blocker","filetype":"json","group":"jet-cca","status":"ready"},"oj-cca-compjson-prop-undef":{"severity":"critical","filetype":"json","group":"jet-cca","status":"ready","props":["description","version","jetVersion","name"]},"oj-cca-compjson-prop-version":{"severity":"blocker","filetype":"json","group":"jet-cca","status":"ready"},"oj-cca-compjson-prop-jetver":{"severity":"blocker","filetype":"json","group":"jet-cca","status":"ready"},"oj-cca-compjson-prop-obs":{"severity":"blocker","filetype":"json","group":"jet-cca","status":"ready"},"oj-cca-compjson-prop-type":{"severity":"critical","filetype":"json","group":"jet-cca","status":"ready"},"oj-cca-compjson-prop-deps":{"severity":"critical","filetype":"json","group":"jet-cca","status":"ready"}}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const RULENAME="oj-css-bp-bgcolor";const DESCRIPTION="Use of CSS 'background-color' is discouraged - use the JET color classes";const SHORT_DESCRIPTION="Use of CSS 'background-color' is discouraged - use the JET color classes";const BG_COLOR="background-color";class Rule{getName(){return RULENAME}getDescription(){return DESCRIPTION}getShortDescription(){return SHORT_DESCRIPTION}register(regCtx){this._CssUtils=regCtx.utils.CssUtils;return{"css-rule":this._onRule,"style":this._onStyle}}_onRule(ruleCtx,rule){var block,decl,issue,i;block=rule.block.children;for(i=0;i<block.length;i++){decl=block[i];if(decl.type==="Declaration"&&decl.property===BG_COLOR&&!_isCssVar(decl)){issue=new ruleCtx.Issue("Use of CSS 'background-color' is discouraged - best practices: replace with JET color classes");issue.setPosition(this._CssUtils.getPosition(ruleCtx,decl.loc));ruleCtx.reporter.addIssue(issue,ruleCtx)}}}_onStyle(ruleCtx,attr,value){var prop,issue,s,x,i;for(i=0;i<value.length;i++){s=value[i];x=s.indexOf(":");if(x>=0){prop=s.substring(0,x).trimEnd();if(prop===BG_COLOR){issue=new ruleCtx.Issue("use of 'background-color' property ('style' attribute) is discouraged - best practices: replace with JET color classes");issue.setMsgKey(RULENAME+"_1");ruleCtx.reporter.addIssue(issue,ruleCtx)}}}}}function _isCssVar(decl){var c,v;c=decl.value.children;if(c){v=c[0];return v.name==="var"}return false};module.exports=Rule;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"name":"attr-req-test","description":"Dummy component with required attributes for unit tests.","version":"1.0.0","jetVersion":">=5.2.0","properties":{"notReq":{"description":"Not required attr","displayName":"foo","type":"string"},"req1":{"description":"required attribute 1","type":"string","displayName":"foo","required":true},"req2":{"description":"required attribute 2","type":"string","displayName":"foo","required":true},"req3":{"description":"required attribute 3","type":"object","displayName":"foo","properties":{"subprop1":{"description":"required attribute 3 sub1","displayName":"foo","type":"string"},"subprop2":{"description":"required attribute 3 sub2","type":"string","displayName":"foo","properties":{"subprop2A":{"description":"required attribute 3 sub2A","displayName":"foo","type":"string","required":true}}}}},"req4":{"description":"attribute 4","type":"object","properties":{"aaa":{"description":"attr4 subprop 1","displayName":"foo","type":"string"},"bbb":{"description":"attr4 subprop 2","displayName":"foo","type":"object","properties":{"ccc":{"description":"attr4 subprop 2a","displayName":"foo","type":"string","required":true}}}}}}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"name":"demo-analog-clock","displayName":"Analog Clock","description":"Analog Clock is a simple analog clock with customizable timezone offset and color options.","license":"https://opensource.org/licenses/UPL","icon":{"iconPath":"extension/images/analog-clock-icon.png","hoverIconPath":"extension/images/analog-clock-icon.png"},"version":"1.0.4","jetVersion":"^4.1.0","properties":{"time":{"description":"iso string equivalent of time to show (unset to show current time)","displayName":"Time to show","type":"string"},"offset":{"description":"timezone offset (unset to show local time)","displayName":"Timezone Offset","type":"number"},"digits":{"description":"comma separeted string containing labels for each digit (unset to show 1 to 12)","displayName":"Digit Labels","type":"string"},"colors":{"description":"clock color options","displayName":"Clock Color Options","type":"object | string","value":{},"properties":{"border":{"description":"clock border color","value":"#333333","type":"string"},"face":{"description":"clock face color","value":"#ffffff","type":"string"},"cap":{"description":"clock cap color","value":"#22A7F0","type":"string"},"digit":{"description":"clock digit color","value":"#333333","type":"string"},"hour":{"description":"hour hand color","value":"#333333","type":"string"},"minute":{"description":"minute hand color","value":"#333333","type":"string"},"second":{"description":"second hand color","value":"#22A7F0","type":"string"}}}},"methods":{},"events":{},"slots":{},"extension":{"status":"Beta","tags":["analog","clock","time","svg"],"catalog":{"category":"Other","status":"Beta","tags":["analog","clock","time","svg","Other: No Dependencies"],"coverImage":"extension/catalog/images/analog-clock-cover.png","screenshots":{"0":"extension/catalog/images/analog-clock-preview.png"},"extraInfo":{}}}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(['ojs/ojcore','knockout','jquery'],function(oj,ko,$){'use strict';function AnalogClockComponentModel(context){var self=this;self.composite=context.element;self._cx=0;self._cy=0;self._radius=ko.observable(0);self._time=null;self._offset=null;self._digits=null;self._hands=[];self._colors=ko.observable({border:'#333333',face:'#ffffff',cap:'#22A7F0',digit:'#333333',hour:'#333333',minute:'#333333',second:'#22A7F0'});context.props.then(function(propertyMap){self.properties=propertyMap;self.config(self.properties)});self.config=function(props){self._time=props.time;self._offset=props.offset!=null?parseFloat(props.offset):null;if(props.digits){var digits=typeof props.digits==='object'?props.digits:props.digits.split(',');self._digits=digits}if(props.colors){var colors=typeof props.colors==='object'?props.colors:JSON.parse(props.colors);for(var property in colors){self._colors()[property]=colors[property]}}};self.init=function(element){self._cx=parseInt(element.style.width||120)/2;self._cy=parseInt(element.style.height||120)/2;self._radius(self._cx<self._cy?self._cx:self._cy);self._hands.push(element.querySelector('#second > *'));self._hands.push(element.querySelector('#minute > *'));self._hands.push(element.querySelector('#hour > *'));transformDigits(element);transformHands(element);if(!self._time){setInterval(function(){transformHands(element)},1000)}};self.composite.onTimeChanged=function(event){self._time=self.properties.time;transformHands(event.currentTarget)};self.composite.onOffsetChanged=function(event){self._offset=self.properties.offset!=null?parseFloat(self.properties.offset):null};self.composite.onDigitsChanged=function(event){if(self.properties.digits){var digits=typeof self.properties.digits==='object'?self.properties.digits:self.properties.digits.split(',');self._digits=digits}transformDigits(event.currentTarget)};self.composite.onColorsChanged=function(event){if(self.properties.options){var colors=typeof self.properties.colors==='object'?self.properties.colors:JSON.parse(self.properties.colors);for(var property in colors){self._colors()[property]=colors[property]}}};function transformHands(element){var date=self._time!=null?new Date(self._time):self._offset!=null?getDateTime(self._offset):new Date;var secAngle=360*date.getSeconds()/60;var minuteAngle=(360*date.getMinutes()/60+date.getSeconds()/10)%360;var hourAngle=(360*date.getHours()/12+date.getMinutes()/2)%360;self._hands[0].setAttribute('from',shifter(secAngle));self._hands[0].setAttribute('to',shifter(secAngle));if(self._hands[0].beginElement)self._hands[0].beginElement();else{self._hands[0].parentNode.setAttribute('x2',self._cx+0.7*self._cx*Math.cos(Math.PI*(secAngle-90)/180));self._hands[0].parentNode.setAttribute('y2',self._cy+0.7*self._cy*Math.sin(Math.PI*(secAngle-90)/180))}self._hands[1].setAttribute('from',shifter(minuteAngle));self._hands[1].setAttribute('to',shifter(minuteAngle));if(self._hands[1].beginElement)self._hands[1].beginElement();else{self._hands[1].parentNode.setAttribute('x2',self._cx+0.6*self._cx*Math.cos(Math.PI*(minuteAngle-90)/180));self._hands[1].parentNode.setAttribute('y2',self._cy+0.6*self._cy*Math.sin(Math.PI*(minuteAngle-90)/180))}self._hands[2].setAttribute('from',shifter(hourAngle));self._hands[2].setAttribute('to',shifter(hourAngle));if(self._hands[2].beginElement)self._hands[2].beginElement();else{self._hands[2].parentNode.setAttribute('x2',self._cx+0.5*self._cx*Math.cos(Math.PI*(hourAngle-90)/180));self._hands[2].parentNode.setAttribute('y2',self._cy+0.5*self._cy*Math.sin(Math.PI*(hourAngle-90)/180))}}function transformDigits(element){$(element).find('#digits').empty();for(var index=1;index<=12;index++){var digit=self._digits?index<=self._digits.length?self._digits[index-1]:index:index;var digitNode=null;if(digit==='|'){var digitNode=document.createElementNS('http://www.w3.org/2000/svg','line');digitNode.setAttribute('x1','{0}'.format(self._cx));digitNode.setAttribute('y1','{0}'.format(0.2*self._radius()));digitNode.setAttribute('x2','{0}'.format(self._cx));digitNode.setAttribute('y2','{0}'.format(0.3*self._radius()));digitNode.setAttribute('style','stroke: {0}'.format(self._colors().digit));digitNode.setAttribute('transform','rotate({0} {1} {2})'.format(index*360/12,self._cx,self._cy))}else{var theta=Math.PI*(2-(index-3)/6);var tx=0.75*self._radius()*Math.cos(theta);var ty=0.75*self._radius()*Math.sin(theta);var digitNode=document.createElementNS('http://www.w3.org/2000/svg','text');digitNode.setAttribute('x',self._cx+tx);digitNode.setAttribute('y',self._cy-ty);digitNode.setAttribute('text-anchor','middle');digitNode.setAttribute('font-size','{0}px'.format(0.1*self._radius()>8?0.1*self._radius():8));digitNode.setAttribute('dominant-baseline','middle');digitNode.setAttribute('style','fill: {0}'.format(self._colors().digit));var textNode=document.createTextNode('{0}'.format(digit));digitNode.appendChild(textNode)}element.querySelector('#digits').appendChild(digitNode)}}function shifter(val){return[val,self._cx,self._cy].join(' ')}function getDateTime(offset){var local=new Date;var localTime=local.getTime();var localOffset=local.getTimezoneOffset()*60000;var utc=localTime+localOffset;return new Date(utc+3600000*offset)}String.prototype.format=function(){var args=arguments;return this.replace(/{(\d+)}/g,function(match,number){return typeof args[number]!='undefined'?args[number]:match})}};AnalogClockComponentModel.prototype.bindingsApplied=function(context){var self=this;self.init(context.element)};return AnalogClockComponentModel});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(['ojs/ojcore','knockout','jquery','ojs/ojinputtext','demo-analog-clock/loader'],function(oj,ko,$){function DemoViewModel(){var self=this;self.demoSource=ko.observable('<!-- shows local time -->\n'+'<demo-analog-clock></demo-analog-clock>\n\n'+'<!-- shows local time with custom style -->\n'+'<demo-analog-clock style=\'width:140px;height:140px\'></demo-analog-clock>\n\n'+'<!-- shows time for timezone with offset +5.30 (IST) -->\n'+'<demo-analog-clock style=\'width:160px;height:160px\' offset=\'5.5\'></demo-analog-clock>\n\n'+'<!-- shows clock with the provided colors via sub-properties -->\n'+'<demo-analog-clock style=\'width:180px;height:180px\' colors.border=\'teal\' colors.cap=\'teal\' colors.second=\'teal\'></demo-analog-clock>\n\n'+'<!-- shows clock with the provided time -->\n'+'<demo-analog-clock style=\'width:200px;height:200px\' time=\'2018-01-21T10:10:30\' colors.border=\'orange\' colors.cap=\'orange\' colors.second=\'orange\'></demo-analog-clock>\n\n'+'<!-- shows clock with the provided digits labels -->\n'+'<demo-analog-clock style=\'width:220px;height:220px\' digits=\'|,|,III,|,|,VI,|,|,IX,|,|,XII\'></demo-analog-clock>\n\n'+'<!-- shows clock with the provided colors -->\n'+'<demo-analog-clock style=\'width:240px;height:240px\' colors=\'{"border":"#8E44AD","face":"#DCC6E0","digit":"transparent","cap":"#8E44AD","hour":"#EA4C88","minute":"#EA4C88","second":"transparent"}\'></demo-analog-clock>');self.handleActivated=function(info){};self.handleAttached=function(info){};self.handleBindingsApplied=function(info){};self.handleDetached=function(info){}}return new DemoViewModel});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
define(['ojs/ojcore','text!./demo-analog-clock-view.html','./demo-analog-clock-viewModel','text!./component.json','css!./demo-analog-clock-styles','ojs/ojcomposite'],function(oj,view,viewModel,metadata){oj.Composite.register('demo-analog-clock',{view:{inline:view},viewModel:{inline:viewModel},metadata:{inline:JSON.parse(metadata)}})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"name":"demo-card","description":"A card element that can display an avatar or initials on one side and employee information on the other.","version":"8.0.0","jetVersion":">=8.0.0 <9.0.0","properties":{"name":{"description":"The employee's full name.","type":"string"},"avatar":{"description":"The url of the employee's image.","type":"string"},"workTitle":{"description":"The employee's job title.","type":"string"},"workNumber":{"description":"The employee's work number.","type":"number"},"email":{"description":"The employee's email.","type":"string"}}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"name":"demo-chart-orientation-control","description":"A chart-type-aware control for easily configuring a chart's orientation property. Only applies to bar, line, area, line with area, combo, box plot, and funnel charts.","version":"1.0.0","jetVersion":">=4.0.0 <5.0.0","properties":{"type":{"description":"The type of chart this component will be controlling.","type":"string","enumValues":["area","bar","boxPlot","combo","funnel","line","lineWithArea"]},"orientation":{"description":"The chart orientation.","type":"string","enumValues":["horizontal","vertical"],"value":"vertical","writeback":true},"focusManagement":{"description":"The focusManagement property should be set to 'none' when the control is placed in a JET Toolbar. This allows the Toolbar to manage the focus.","type":"string","enumValues":["oneTabstop","none"],"value":"oneTabstop"},"disabled":{"description":"Specifies whether this control should be disabled or not","type":"boolean","value":false}}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"name":"demo-chart-stack-control","description":"A chart-type-aware control for easily configuring a chart's stack property. Only applies to bar, area, line with area, and combo charts.","version":"1.0.0","jetVersion":">=4.0.0 <5.0.0","properties":{"type":{"description":"The type of chart this component will be controlling.","type":"string","enumValues":["area","bar","combo","lineWithArea"]},"stack":{"description":"The chart stack property.","type":"string","enumValues":["on","off"],"value":"off","writeback":true},"focusManagement":{"description":"The focusManagement property should be set to 'none' when the control is placed in a JET Toolbar. This allows the Toolbar to manage the focus.","type":"string","enumValues":["oneTabstop","none"],"value":"oneTabstop"},"disabled":{"description":"Specifies whether this control should be disabled or not","type":"boolean","value":false}}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"name":"made-up","description":"A fictional custom element not starting with oj-","version":"1.0.0","jetVersion":">=4.0.0 <=10.0.0","properties":{"type":{"description":"fictional property.","type":"string","enumValues":["this","that","other"]}}}
|