@kensio/yulin 1.10.0 → 1.10.1
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/dist/config/eslint/cffjs2.eslint.config.js +17 -98
- package/dist/config/eslint/cffjs2.eslint.config.js.map +1 -1
- package/dist/config/lint/cff-js2-lint-plugin.d.ts +16 -0
- package/dist/config/lint/cff-js2-lint-plugin.d.ts.map +1 -0
- package/dist/config/lint/cff-js2-lint-plugin.js +39 -0
- package/dist/config/lint/cff-js2-lint-plugin.js.map +1 -0
- package/dist/config/lint/cff-js2-lint-rules.d.ts +20 -0
- package/dist/config/lint/cff-js2-lint-rules.d.ts.map +1 -0
- package/dist/config/lint/cff-js2-lint-rules.js +53 -0
- package/dist/config/lint/cff-js2-lint-rules.js.map +1 -0
- package/dist/config/lint/cff-js2-lint.fixture.d.ts +39 -0
- package/dist/config/lint/cff-js2-lint.fixture.d.ts.map +1 -0
- package/dist/config/lint/cff-js2-lint.fixture.js +229 -0
- package/dist/config/lint/cff-js2-lint.fixture.js.map +1 -0
- package/dist/config/lint/cff-js2-oxlint-plugin.d.ts +9 -0
- package/dist/config/lint/cff-js2-oxlint-plugin.d.ts.map +1 -0
- package/dist/config/lint/cff-js2-oxlint-plugin.js +9 -0
- package/dist/config/lint/cff-js2-oxlint-plugin.js.map +1 -0
- package/dist/config/lint/cff-js2-restriction.d.ts +82 -0
- package/dist/config/lint/cff-js2-restriction.d.ts.map +1 -0
- package/dist/config/lint/cff-js2-restriction.js +85 -0
- package/dist/config/lint/cff-js2-restriction.js.map +1 -0
- package/dist/config/lint/cff-js2-unavailable-global.rule.d.ts +10 -0
- package/dist/config/lint/cff-js2-unavailable-global.rule.d.ts.map +1 -0
- package/dist/config/lint/cff-js2-unavailable-global.rule.js +42 -0
- package/dist/config/lint/cff-js2-unavailable-global.rule.js.map +1 -0
- package/dist/config/lint/index.d.ts +6 -0
- package/dist/config/lint/index.d.ts.map +1 -0
- package/dist/config/lint/index.js +5 -0
- package/dist/config/lint/index.js.map +1 -0
- package/dist/config/lint/lint-plugin.type.d.ts +82 -0
- package/dist/config/lint/lint-plugin.type.d.ts.map +1 -0
- package/dist/config/lint/lint-plugin.type.js +11 -0
- package/dist/config/lint/lint-plugin.type.js.map +1 -0
- package/dist/config/oxlint/cffjs2.oxlint.config.d.ts +26 -0
- package/dist/config/oxlint/cffjs2.oxlint.config.d.ts.map +1 -0
- package/dist/config/oxlint/cffjs2.oxlint.config.js +28 -0
- package/dist/config/oxlint/cffjs2.oxlint.config.js.map +1 -0
- package/dist/config/oxlint/cffjs2.oxlintrc.json +36 -0
- package/dist/config/oxlint/index.d.ts +2 -0
- package/dist/config/oxlint/index.d.ts.map +1 -0
- package/dist/config/oxlint/index.js +2 -0
- package/dist/config/oxlint/index.js.map +1 -0
- package/dist/serve/http/live-reload/sim-local-live-reload.d.ts.map +1 -1
- package/dist/serve/http/live-reload/sim-local-live-reload.js +2 -3
- package/dist/serve/http/live-reload/sim-local-live-reload.js.map +1 -1
- package/dist/service/acm/validation/sim-acm-certificate-validation.d.ts.map +1 -1
- package/dist/service/acm/validation/sim-acm-certificate-validation.js +3 -4
- package/dist/service/acm/validation/sim-acm-certificate-validation.js.map +1 -1
- package/dist/service/aws/caller/sim-aws-caller-resolver.d.ts.map +1 -1
- package/dist/service/aws/caller/sim-aws-caller-resolver.js +2 -3
- package/dist/service/aws/caller/sim-aws-caller-resolver.js.map +1 -1
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/source/sim-cdk-bucket-deploy-source.d.ts.map +1 -1
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/source/sim-cdk-bucket-deploy-source.js +1 -0
- package/dist/service/cloudformation/cdk/s3/bucket-deployment/source/sim-cdk-bucket-deploy-source.js.map +1 -1
- package/dist/service/cloudformation/resource/cfn/dynamodb/sim-dynamodb-table-cfn.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/cfn/dynamodb/sim-dynamodb-table-cfn.js +4 -5
- package/dist/service/cloudformation/resource/cfn/dynamodb/sim-dynamodb-table-cfn.js.map +1 -1
- package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-resolver.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-resolver.js +2 -3
- package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-resolver.js.map +1 -1
- package/dist/service/cloudformation/template/node/fn/if/sim-cfn-fn-if.d.ts.map +1 -1
- package/dist/service/cloudformation/template/node/fn/if/sim-cfn-fn-if.js +3 -4
- package/dist/service/cloudformation/template/node/fn/if/sim-cfn-fn-if.js.map +1 -1
- package/dist/service/cognito/user-pool/trigger/sim-aws-cognito-trigger-functions.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/trigger/sim-aws-cognito-trigger-functions.js +1 -0
- package/dist/service/cognito/user-pool/trigger/sim-aws-cognito-trigger-functions.js.map +1 -1
- package/dist/service/iam/credential/session/sim-iam-session-manager.d.ts.map +1 -1
- package/dist/service/iam/credential/session/sim-iam-session-manager.js +2 -4
- package/dist/service/iam/credential/session/sim-iam-session-manager.js.map +1 -1
- package/dist/service/iam/registry/sim-iam-registry.d.ts.map +1 -1
- package/dist/service/iam/registry/sim-iam-registry.js +2 -3
- package/dist/service/iam/registry/sim-iam-registry.js.map +1 -1
- package/dist/service/route53/command/list-resource-record-sets/record-set-output.d.ts.map +1 -1
- package/dist/service/route53/command/list-resource-record-sets/record-set-output.js +2 -4
- package/dist/service/route53/command/list-resource-record-sets/record-set-output.js.map +1 -1
- package/dist/service/route53/dns/dns-record-type.d.ts.map +1 -1
- package/dist/service/route53/dns/dns-record-type.js +2 -4
- package/dist/service/route53/dns/dns-record-type.js.map +1 -1
- package/dist/service/s3/bucket/sim-s3-bucket-access.d.ts +4 -0
- package/dist/service/s3/bucket/sim-s3-bucket-access.d.ts.map +1 -1
- package/dist/service/s3/bucket/sim-s3-bucket-access.js +8 -0
- package/dist/service/s3/bucket/sim-s3-bucket-access.js.map +1 -1
- package/dist/service/s3/index.d.ts +2 -0
- package/dist/service/s3/index.d.ts.map +1 -1
- package/dist/service/s3/mount/sim-s3-mount.type.d.ts +22 -0
- package/dist/service/s3/mount/sim-s3-mount.type.d.ts.map +1 -1
- package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.d.ts.map +1 -1
- package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.js +1 -0
- package/dist/service/s3/notification/destination/lambda/sim-aws-s3-notification-functions.js.map +1 -1
- package/dist/service/s3/object/s3-key-prefix-metadata.d.ts +51 -0
- package/dist/service/s3/object/s3-key-prefix-metadata.d.ts.map +1 -0
- package/dist/service/s3/object/s3-key-prefix-metadata.js +43 -0
- package/dist/service/s3/object/s3-key-prefix-metadata.js.map +1 -0
- package/dist/service/s3/sim-s3.d.ts +5 -0
- package/dist/service/s3/sim-s3.d.ts.map +1 -1
- package/dist/service/s3/sim-s3.js +5 -0
- package/dist/service/s3/sim-s3.js.map +1 -1
- package/dist/service/s3/storage/filesystem/s3-filesystem-object-metadata.d.ts +6 -1
- package/dist/service/s3/storage/filesystem/s3-filesystem-object-metadata.d.ts.map +1 -1
- package/dist/service/s3/storage/filesystem/s3-filesystem-object-metadata.js +7 -1
- package/dist/service/s3/storage/filesystem/s3-filesystem-object-metadata.js.map +1 -1
- package/dist/service/s3/storage/filesystem/s3-filesystem-storage.d.ts +7 -0
- package/dist/service/s3/storage/filesystem/s3-filesystem-storage.d.ts.map +1 -1
- package/dist/service/s3/storage/filesystem/s3-filesystem-storage.js +5 -1
- package/dist/service/s3/storage/filesystem/s3-filesystem-storage.js.map +1 -1
- package/dist/util/filesystem/temporary-directory.d.ts +4 -1
- package/dist/util/filesystem/temporary-directory.d.ts.map +1 -1
- package/dist/util/filesystem/temporary-directory.js +5 -3
- package/dist/util/filesystem/temporary-directory.js.map +1 -1
- package/package.json +9 -2
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the CloudFront Functions JS2 runtime will not run, as syntax selectors.
|
|
3
|
+
*
|
|
4
|
+
* JS2 is compliant with ECMAScript 5.1 and adds a named subset of ES 6 to 12,
|
|
5
|
+
* so a Function that uses something outside that subset fails when it is
|
|
6
|
+
* published, a long way from where it was written. Each entry names a
|
|
7
|
+
* construct the runtime has no support for and says what to write instead, so
|
|
8
|
+
* the refusal arrives in the editor.
|
|
9
|
+
*
|
|
10
|
+
* Every entry is drawn from the runtime's own feature list, which is an
|
|
11
|
+
* allow-list: anything the documentation does not name is unsupported. Nothing
|
|
12
|
+
* here is house style. A restriction on syntax JS2 accepts would send a reader
|
|
13
|
+
* away from code that works, which is worse than no lint rule at all.
|
|
14
|
+
*
|
|
15
|
+
* https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/functions-javascript-runtime-20.html
|
|
16
|
+
*
|
|
17
|
+
* The selector syntax is the one both ESLint and Oxlint accept, which is what
|
|
18
|
+
* lets a single rule module serve either linter.
|
|
19
|
+
*/
|
|
20
|
+
export declare const cffJs2SyntaxRestrictions: {
|
|
21
|
+
readonly "no-import": {
|
|
22
|
+
readonly selector: "ImportDeclaration";
|
|
23
|
+
readonly message: "CloudFront Functions must be self-contained and should not use import syntax.";
|
|
24
|
+
};
|
|
25
|
+
readonly "only-handler-export": {
|
|
26
|
+
readonly selector: "ExportNamedDeclaration:not([declaration.type='FunctionDeclaration'][declaration.id.name='handler']), ExportDefaultDeclaration, ExportAllDeclaration";
|
|
27
|
+
readonly message: "CloudFront Function files may only export the handler as `export function handler(...)`.";
|
|
28
|
+
};
|
|
29
|
+
readonly "only-built-in-require": {
|
|
30
|
+
readonly selector: "CallExpression[callee.name='require']:not(:has(Literal[value='querystring'])):not(:has(Literal[value='crypto'])):not(:has(Literal[value='buffer']))";
|
|
31
|
+
readonly message: "CloudFront Functions can only require the built-in `querystring`, `crypto` and `buffer` modules. Everything else must be inlined.";
|
|
32
|
+
};
|
|
33
|
+
readonly "no-class": {
|
|
34
|
+
readonly selector: "ClassDeclaration, ClassExpression";
|
|
35
|
+
readonly message: "CloudFront Functions JS2 does not support class syntax. Use a constructor function or a plain object instead.";
|
|
36
|
+
};
|
|
37
|
+
readonly "no-generator": {
|
|
38
|
+
readonly selector: "YieldExpression, FunctionDeclaration[generator=true], FunctionExpression[generator=true]";
|
|
39
|
+
readonly message: "CloudFront Functions JS2 does not support generators.";
|
|
40
|
+
};
|
|
41
|
+
readonly "no-destructuring": {
|
|
42
|
+
readonly selector: "ObjectPattern, ArrayPattern";
|
|
43
|
+
readonly message: "CloudFront Functions JS2 does not support destructuring. Read the properties one at a time instead.";
|
|
44
|
+
};
|
|
45
|
+
readonly "no-spread": {
|
|
46
|
+
readonly selector: "SpreadElement";
|
|
47
|
+
readonly message: "CloudFront Functions JS2 does not support spread syntax. Rest parameters are supported, so `function f(...args)` is fine, but `[...list]` is not.";
|
|
48
|
+
};
|
|
49
|
+
readonly "no-for-of": {
|
|
50
|
+
readonly selector: "ForOfStatement";
|
|
51
|
+
readonly message: "CloudFront Functions JS2 does not support for...of. Use an index-based loop or for...in instead.";
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Globals a CloudFront Function cannot reach, and why each one is absent.
|
|
56
|
+
*
|
|
57
|
+
* These read as ordinary JavaScript and fail only at the edge, which is the
|
|
58
|
+
* worst place to find out. The reason matters as much as the refusal: `fetch`
|
|
59
|
+
* is missing because the runtime has no network, and `setTimeout` because it
|
|
60
|
+
* has no event loop, and those two dead ends want different rewrites.
|
|
61
|
+
*
|
|
62
|
+
* `Promise` and `Buffer` are deliberately absent from this list. Both are
|
|
63
|
+
* supported in runtime 2.0, and an earlier version of this config refused them.
|
|
64
|
+
*/
|
|
65
|
+
export declare const cffJs2UnavailableGlobals: {
|
|
66
|
+
readonly fetch: "CloudFront Functions cannot make network requests.";
|
|
67
|
+
readonly XMLHttpRequest: "CloudFront Functions cannot make network requests.";
|
|
68
|
+
readonly WebSocket: "CloudFront Functions cannot open network connections.";
|
|
69
|
+
readonly process: "CloudFront Functions do not have access to Node.js process APIs.";
|
|
70
|
+
readonly setTimeout: "CloudFront Functions do not support timers, and must run to completion synchronously.";
|
|
71
|
+
readonly setInterval: "CloudFront Functions do not support timers, and must run to completion synchronously.";
|
|
72
|
+
readonly setImmediate: "CloudFront Functions do not support timers, and must run to completion synchronously.";
|
|
73
|
+
readonly clearTimeout: "CloudFront Functions do not support timers, so there is nothing to clear.";
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* The name of the rule that reports an unavailable global.
|
|
77
|
+
*
|
|
78
|
+
* It is kept apart from the syntax restrictions because it resolves names
|
|
79
|
+
* through scope rather than matching a selector.
|
|
80
|
+
*/
|
|
81
|
+
export declare const cffJs2UnavailableGlobalRuleName = "no-unavailable-global";
|
|
82
|
+
//# sourceMappingURL=cff-js2-restriction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cff-js2-restriction.d.ts","sourceRoot":"","sources":["../../../src/config/lint/cff-js2-restriction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,wBAAwB;;iBAEjC,QAAQ,EAAE,mBAAmB;iBAC7B,OAAO,EACL,+EAA+E;;;iBAGjF,QAAQ,EACN,qJAAqJ;iBACvJ,OAAO,EACL,0FAA0F;;;iBAG5F,QAAQ,EACN,qJAAqJ;iBACvJ,OAAO,EACL,mIAAmI;;;iBAGrI,QAAQ,EAAE,mCAAmC;iBAC7C,OAAO,EACL,+GAA+G;;;iBAGjH,QAAQ,EACN,0FAA0F;iBAC5F,OAAO,EAAE,uDAAuD;;;iBAGhE,QAAQ,EAAE,6BAA6B;iBACvC,OAAO,EACL,qGAAqG;;;iBAMvG,QAAQ,EAAE,eAAe;iBACzB,OAAO,EACL,mJAAmJ;;;iBAGrJ,QAAQ,EAAE,gBAAgB;iBAC1B,OAAO,EACL,kGAAkG;;CAIvG,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB;oBAC5B,oDAAoD;6BAC3C,oDAAoD;wBACzD,uDAAuD;sBACzD,kEAAkE;yBAEzE,uFAAuF;0BAEvF,uFAAuF;2BAEvF,uFAAuF;2BAEvF,2EAA2E;CAC1B,CAAC;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the CloudFront Functions JS2 runtime will not run, as syntax selectors.
|
|
3
|
+
*
|
|
4
|
+
* JS2 is compliant with ECMAScript 5.1 and adds a named subset of ES 6 to 12,
|
|
5
|
+
* so a Function that uses something outside that subset fails when it is
|
|
6
|
+
* published, a long way from where it was written. Each entry names a
|
|
7
|
+
* construct the runtime has no support for and says what to write instead, so
|
|
8
|
+
* the refusal arrives in the editor.
|
|
9
|
+
*
|
|
10
|
+
* Every entry is drawn from the runtime's own feature list, which is an
|
|
11
|
+
* allow-list: anything the documentation does not name is unsupported. Nothing
|
|
12
|
+
* here is house style. A restriction on syntax JS2 accepts would send a reader
|
|
13
|
+
* away from code that works, which is worse than no lint rule at all.
|
|
14
|
+
*
|
|
15
|
+
* https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/functions-javascript-runtime-20.html
|
|
16
|
+
*
|
|
17
|
+
* The selector syntax is the one both ESLint and Oxlint accept, which is what
|
|
18
|
+
* lets a single rule module serve either linter.
|
|
19
|
+
*/
|
|
20
|
+
export const cffJs2SyntaxRestrictions = {
|
|
21
|
+
"no-import": {
|
|
22
|
+
selector: "ImportDeclaration",
|
|
23
|
+
message: "CloudFront Functions must be self-contained and should not use import syntax.",
|
|
24
|
+
},
|
|
25
|
+
"only-handler-export": {
|
|
26
|
+
selector: "ExportNamedDeclaration:not([declaration.type='FunctionDeclaration'][declaration.id.name='handler']), ExportDefaultDeclaration, ExportAllDeclaration",
|
|
27
|
+
message: "CloudFront Function files may only export the handler as `export function handler(...)`.",
|
|
28
|
+
},
|
|
29
|
+
"only-built-in-require": {
|
|
30
|
+
selector: "CallExpression[callee.name='require']:not(:has(Literal[value='querystring'])):not(:has(Literal[value='crypto'])):not(:has(Literal[value='buffer']))",
|
|
31
|
+
message: "CloudFront Functions can only require the built-in `querystring`, `crypto` and `buffer` modules. Everything else must be inlined.",
|
|
32
|
+
},
|
|
33
|
+
"no-class": {
|
|
34
|
+
selector: "ClassDeclaration, ClassExpression",
|
|
35
|
+
message: "CloudFront Functions JS2 does not support class syntax. Use a constructor function or a plain object instead.",
|
|
36
|
+
},
|
|
37
|
+
"no-generator": {
|
|
38
|
+
selector: "YieldExpression, FunctionDeclaration[generator=true], FunctionExpression[generator=true]",
|
|
39
|
+
message: "CloudFront Functions JS2 does not support generators.",
|
|
40
|
+
},
|
|
41
|
+
"no-destructuring": {
|
|
42
|
+
selector: "ObjectPattern, ArrayPattern",
|
|
43
|
+
message: "CloudFront Functions JS2 does not support destructuring. Read the properties one at a time instead.",
|
|
44
|
+
},
|
|
45
|
+
"no-spread": {
|
|
46
|
+
// Rest parameters are a separate ES 6 feature that JS2 does name as
|
|
47
|
+
// supported, and they share the `RestElement` node, so only spread is
|
|
48
|
+
// matched here.
|
|
49
|
+
selector: "SpreadElement",
|
|
50
|
+
message: "CloudFront Functions JS2 does not support spread syntax. Rest parameters are supported, so `function f(...args)` is fine, but `[...list]` is not.",
|
|
51
|
+
},
|
|
52
|
+
"no-for-of": {
|
|
53
|
+
selector: "ForOfStatement",
|
|
54
|
+
message: "CloudFront Functions JS2 does not support for...of. Use an index-based loop or for...in instead.",
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Globals a CloudFront Function cannot reach, and why each one is absent.
|
|
59
|
+
*
|
|
60
|
+
* These read as ordinary JavaScript and fail only at the edge, which is the
|
|
61
|
+
* worst place to find out. The reason matters as much as the refusal: `fetch`
|
|
62
|
+
* is missing because the runtime has no network, and `setTimeout` because it
|
|
63
|
+
* has no event loop, and those two dead ends want different rewrites.
|
|
64
|
+
*
|
|
65
|
+
* `Promise` and `Buffer` are deliberately absent from this list. Both are
|
|
66
|
+
* supported in runtime 2.0, and an earlier version of this config refused them.
|
|
67
|
+
*/
|
|
68
|
+
export const cffJs2UnavailableGlobals = {
|
|
69
|
+
fetch: "CloudFront Functions cannot make network requests.",
|
|
70
|
+
XMLHttpRequest: "CloudFront Functions cannot make network requests.",
|
|
71
|
+
WebSocket: "CloudFront Functions cannot open network connections.",
|
|
72
|
+
process: "CloudFront Functions do not have access to Node.js process APIs.",
|
|
73
|
+
setTimeout: "CloudFront Functions do not support timers, and must run to completion synchronously.",
|
|
74
|
+
setInterval: "CloudFront Functions do not support timers, and must run to completion synchronously.",
|
|
75
|
+
setImmediate: "CloudFront Functions do not support timers, and must run to completion synchronously.",
|
|
76
|
+
clearTimeout: "CloudFront Functions do not support timers, so there is nothing to clear.",
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* The name of the rule that reports an unavailable global.
|
|
80
|
+
*
|
|
81
|
+
* It is kept apart from the syntax restrictions because it resolves names
|
|
82
|
+
* through scope rather than matching a selector.
|
|
83
|
+
*/
|
|
84
|
+
export const cffJs2UnavailableGlobalRuleName = "no-unavailable-global";
|
|
85
|
+
//# sourceMappingURL=cff-js2-restriction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cff-js2-restriction.js","sourceRoot":"","sources":["../../../src/config/lint/cff-js2-restriction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,WAAW,EAAE;QACX,QAAQ,EAAE,mBAAmB;QAC7B,OAAO,EACL,+EAA+E;KAClF;IACD,qBAAqB,EAAE;QACrB,QAAQ,EACN,qJAAqJ;QACvJ,OAAO,EACL,0FAA0F;KAC7F;IACD,uBAAuB,EAAE;QACvB,QAAQ,EACN,qJAAqJ;QACvJ,OAAO,EACL,mIAAmI;KACtI;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,mCAAmC;QAC7C,OAAO,EACL,+GAA+G;KAClH;IACD,cAAc,EAAE;QACd,QAAQ,EACN,0FAA0F;QAC5F,OAAO,EAAE,uDAAuD;KACjE;IACD,kBAAkB,EAAE;QAClB,QAAQ,EAAE,6BAA6B;QACvC,OAAO,EACL,qGAAqG;KACxG;IACD,WAAW,EAAE;QACX,oEAAoE;QACpE,sEAAsE;QACtE,gBAAgB;QAChB,QAAQ,EAAE,eAAe;QACzB,OAAO,EACL,mJAAmJ;KACtJ;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,gBAAgB;QAC1B,OAAO,EACL,kGAAkG;KACrG;CAGF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,KAAK,EAAE,oDAAoD;IAC3D,cAAc,EAAE,oDAAoD;IACpE,SAAS,EAAE,uDAAuD;IAClE,OAAO,EAAE,kEAAkE;IAC3E,UAAU,EACR,uFAAuF;IACzF,WAAW,EACT,uFAAuF;IACzF,YAAY,EACV,uFAAuF;IACzF,YAAY,EACV,2EAA2E;CAC1B,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { LintRule } from "./lint-plugin.type.js";
|
|
2
|
+
/**
|
|
3
|
+
* Reports a name the CloudFront Functions runtime does not provide.
|
|
4
|
+
*
|
|
5
|
+
* Names are resolved through scope rather than matched as text, so a local
|
|
6
|
+
* variable called `fetch` and a property called `event.fetch` are both left
|
|
7
|
+
* alone: what is reported is a reference that would reach a global.
|
|
8
|
+
*/
|
|
9
|
+
export declare function cffJs2UnavailableGlobalRule(): LintRule;
|
|
10
|
+
//# sourceMappingURL=cff-js2-unavailable-global.rule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cff-js2-unavailable-global.rule.d.ts","sourceRoot":"","sources":["../../../src/config/lint/cff-js2-unavailable-global.rule.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,QAAQ,EAGT,MAAM,uBAAuB,CAAC;AAY/B;;;;;;GAMG;AACH,wBAAgB,2BAA2B,IAAI,QAAQ,CA4BtD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { cffJs2UnavailableGlobals } from "./cff-js2-restriction.js";
|
|
2
|
+
/**
|
|
3
|
+
* Scope is only complete once the whole file has been walked, so the globals a
|
|
4
|
+
* file reaches for are counted on the way out of it rather than on the way in.
|
|
5
|
+
*/
|
|
6
|
+
const programExitSelector = "Program:exit";
|
|
7
|
+
const reasons = new Map(Object.entries(cffJs2UnavailableGlobals));
|
|
8
|
+
/**
|
|
9
|
+
* Reports a name the CloudFront Functions runtime does not provide.
|
|
10
|
+
*
|
|
11
|
+
* Names are resolved through scope rather than matched as text, so a local
|
|
12
|
+
* variable called `fetch` and a property called `event.fetch` are both left
|
|
13
|
+
* alone: what is reported is a reference that would reach a global.
|
|
14
|
+
*/
|
|
15
|
+
export function cffJs2UnavailableGlobalRule() {
|
|
16
|
+
return {
|
|
17
|
+
meta: {
|
|
18
|
+
type: "problem",
|
|
19
|
+
schema: [],
|
|
20
|
+
messages: { unsupported: "{{why}}" },
|
|
21
|
+
},
|
|
22
|
+
create: (context) => ({
|
|
23
|
+
[programExitSelector]: (node) => {
|
|
24
|
+
const scope = context.sourceCode.getScope(node);
|
|
25
|
+
for (const reference of [
|
|
26
|
+
...scope.through,
|
|
27
|
+
...scope.variables.flatMap((variable) => variable.references),
|
|
28
|
+
]) {
|
|
29
|
+
const why = reasons.get(reference.identifier.name);
|
|
30
|
+
if (why !== undefined) {
|
|
31
|
+
context.report({
|
|
32
|
+
node: reference.identifier,
|
|
33
|
+
messageId: "unsupported",
|
|
34
|
+
data: { why },
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
}),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=cff-js2-unavailable-global.rule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cff-js2-unavailable-global.rule.js","sourceRoot":"","sources":["../../../src/config/lint/cff-js2-unavailable-global.rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAQpE;;;GAGG;AACH,MAAM,mBAAmB,GAAG,cAAc,CAAC;AAE3C,MAAM,OAAO,GAAG,IAAI,GAAG,CACrB,MAAM,CAAC,OAAO,CAAC,wBAAwB,CAAC,CACzC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,2BAA2B;IACzC,OAAO;QACL,IAAI,EAAE;YACJ,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE;SACrC;QACD,MAAM,EAAE,CAAC,OAAwB,EAAe,EAAE,CAAC,CAAC;YAClD,CAAC,mBAAmB,CAAC,EAAE,CAAC,IAAc,EAAQ,EAAE;gBAC9C,MAAM,KAAK,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;gBAEhD,KAAK,MAAM,SAAS,IAAI;oBACtB,GAAG,KAAK,CAAC,OAAO;oBAChB,GAAG,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC;iBAC9D,EAAE,CAAC;oBACF,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;oBAEnD,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;wBACtB,OAAO,CAAC,MAAM,CAAC;4BACb,IAAI,EAAE,SAAS,CAAC,UAAU;4BAC1B,SAAS,EAAE,aAAa;4BACxB,IAAI,EAAE,EAAE,GAAG,EAAE;yBACd,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { cffJs2LintPlugin, cffJs2PluginName } from "./cff-js2-lint-plugin.js";
|
|
2
|
+
export { cffJs2LintPluginRules, cffJs2LintRules, type LintRuleSetting, } from "./cff-js2-lint-rules.js";
|
|
3
|
+
export { cffJs2SyntaxRestrictions, cffJs2UnavailableGlobalRuleName, cffJs2UnavailableGlobals, } from "./cff-js2-restriction.js";
|
|
4
|
+
export { cffJs2UnavailableGlobalRule } from "./cff-js2-unavailable-global.rule.js";
|
|
5
|
+
export type { LintIdentifierNode, LintNode, LintPlugin, LintReference, LintRule, LintRuleContext, LintScope, LintVariable, LintVisitor, } from "./lint-plugin.type.js";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/lint/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,KAAK,eAAe,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,wBAAwB,EACxB,+BAA+B,EAC/B,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,YAAY,EACV,kBAAkB,EAClB,QAAQ,EACR,UAAU,EACV,aAAa,EACb,QAAQ,EACR,eAAe,EACf,SAAS,EACT,YAAY,EACZ,WAAW,GACZ,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { cffJs2LintPlugin, cffJs2PluginName } from "./cff-js2-lint-plugin.js";
|
|
2
|
+
export { cffJs2LintPluginRules, cffJs2LintRules, } from "./cff-js2-lint-rules.js";
|
|
3
|
+
export { cffJs2SyntaxRestrictions, cffJs2UnavailableGlobalRuleName, cffJs2UnavailableGlobals, } from "./cff-js2-restriction.js";
|
|
4
|
+
export { cffJs2UnavailableGlobalRule } from "./cff-js2-unavailable-global.rule.js";
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/lint/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EACL,qBAAqB,EACrB,eAAe,GAEhB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,wBAAwB,EACxB,+BAA+B,EAC/B,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The slice of a linter's rule API that these plugins actually touch.
|
|
3
|
+
*
|
|
4
|
+
* ESLint and Oxlint both load the same plugin object, so typing it against
|
|
5
|
+
* either one's published types would tie the plugin to a linter it is meant to
|
|
6
|
+
* outlive. These declarations describe only what the rules here call, which is
|
|
7
|
+
* narrow enough to stay true of both and leaves the plugin with no dependency
|
|
8
|
+
* of its own.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* A node in the syntax tree, identified by the type name a selector matches.
|
|
12
|
+
*/
|
|
13
|
+
export interface LintNode {
|
|
14
|
+
readonly type: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* An identifier node, which is the only node kind read by name here.
|
|
18
|
+
*/
|
|
19
|
+
export interface LintIdentifierNode extends LintNode {
|
|
20
|
+
readonly name: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* One place a binding is read or written.
|
|
24
|
+
*/
|
|
25
|
+
export interface LintReference {
|
|
26
|
+
readonly identifier: LintIdentifierNode;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A resolved binding together with every reference to it.
|
|
30
|
+
*/
|
|
31
|
+
export interface LintVariable {
|
|
32
|
+
readonly references: readonly LintReference[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A lexical scope, as the linter resolved it.
|
|
36
|
+
*
|
|
37
|
+
* References to a name nothing declares land in `through` rather than in
|
|
38
|
+
* `variables`, so a rule looking for globals has to read both: which of the two
|
|
39
|
+
* a name falls into depends on whether the linter was told that global exists.
|
|
40
|
+
*/
|
|
41
|
+
export interface LintScope {
|
|
42
|
+
readonly through: readonly LintReference[];
|
|
43
|
+
readonly variables: readonly LintVariable[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* What a rule is handed for the file it is looking at.
|
|
47
|
+
*/
|
|
48
|
+
export interface LintRuleContext {
|
|
49
|
+
readonly sourceCode: {
|
|
50
|
+
getScope(node: LintNode): LintScope;
|
|
51
|
+
};
|
|
52
|
+
report(descriptor: {
|
|
53
|
+
node: LintNode;
|
|
54
|
+
messageId: string;
|
|
55
|
+
data?: Readonly<Record<string, string>>;
|
|
56
|
+
}): void;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The handlers a rule registers, keyed by the selector that triggers them.
|
|
60
|
+
*/
|
|
61
|
+
export type LintVisitor = Record<string, (node: never) => void>;
|
|
62
|
+
/**
|
|
63
|
+
* One rule, in the shape both linters expect to load.
|
|
64
|
+
*/
|
|
65
|
+
export interface LintRule {
|
|
66
|
+
readonly meta: {
|
|
67
|
+
readonly type: "problem";
|
|
68
|
+
readonly schema: readonly [];
|
|
69
|
+
readonly messages: Readonly<Record<string, string>>;
|
|
70
|
+
};
|
|
71
|
+
create(context: LintRuleContext): LintVisitor;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* A plugin, in the shape both linters expect to load.
|
|
75
|
+
*/
|
|
76
|
+
export interface LintPlugin {
|
|
77
|
+
readonly meta: {
|
|
78
|
+
readonly name: string;
|
|
79
|
+
};
|
|
80
|
+
readonly rules: Readonly<Record<string, LintRule>>;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=lint-plugin.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lint-plugin.type.d.ts","sourceRoot":"","sources":["../../../src/config/lint/lint-plugin.type.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,QAAQ;IAClD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,UAAU,EAAE,SAAS,aAAa,EAAE,CAAC;CAC/C;AAED;;;;;;GAMG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,CAAC;IAC3C,QAAQ,CAAC,SAAS,EAAE,SAAS,YAAY,EAAE,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,UAAU,EAAE;QACnB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;KACrC,CAAC;IACF,MAAM,CAAC,UAAU,EAAE;QACjB,IAAI,EAAE,QAAQ,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;KACzC,GAAG,IAAI,CAAC;CACV;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC;AAEhE;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE;QACb,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;QACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC;QAC7B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;KACrD,CAAC;IACF,MAAM,CAAC,OAAO,EAAE,eAAe,GAAG,WAAW,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;CACpD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The slice of a linter's rule API that these plugins actually touch.
|
|
3
|
+
*
|
|
4
|
+
* ESLint and Oxlint both load the same plugin object, so typing it against
|
|
5
|
+
* either one's published types would tie the plugin to a linter it is meant to
|
|
6
|
+
* outlive. These declarations describe only what the rules here call, which is
|
|
7
|
+
* narrow enough to stay true of both and leaves the plugin with no dependency
|
|
8
|
+
* of its own.
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=lint-plugin.type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lint-plugin.type.js","sourceRoot":"","sources":["../../../src/config/lint/lint-plugin.type.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type LintRuleSetting } from "../lint/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* An Oxlint config fragment, in the shape `.oxlintrc.json` is written in.
|
|
4
|
+
*/
|
|
5
|
+
export interface OxlintConfig {
|
|
6
|
+
readonly jsPlugins: readonly {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly specifier: string;
|
|
9
|
+
}[];
|
|
10
|
+
readonly overrides: readonly {
|
|
11
|
+
readonly files: readonly string[];
|
|
12
|
+
readonly rules: Readonly<Record<string, LintRuleSetting>>;
|
|
13
|
+
}[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Oxlint's half of the CloudFront Functions JS2 lint setup.
|
|
17
|
+
*
|
|
18
|
+
* It is an override rather than a top-level rule block because a consumer
|
|
19
|
+
* extends this into the config that lints their whole repository, and JS2's
|
|
20
|
+
* restrictions would be wrong applied anywhere but a `.cff.js` file: a project
|
|
21
|
+
* told not to use arrow functions everywhere would be unusable.
|
|
22
|
+
*
|
|
23
|
+
* The rules are the same ones the ESLint config uses, from the same source.
|
|
24
|
+
*/
|
|
25
|
+
export declare const cloudFrontFunctionsJs2Oxlint: OxlintConfig;
|
|
26
|
+
//# sourceMappingURL=cffjs2.oxlint.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cffjs2.oxlint.config.d.ts","sourceRoot":"","sources":["../../../src/config/oxlint/cffjs2.oxlint.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAC;AAE1B;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,SAAS,EAAE,SAAS;QAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;KAC5B,EAAE,CAAC;IACJ,QAAQ,CAAC,SAAS,EAAE,SAAS;QAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;QAClC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;KAC3D,EAAE,CAAC;CACL;AAUD;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,EAAE,YAQ1C,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { cffJs2LintRules, cffJs2PluginName, } from "../lint/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Where the built plugin sits, relative to the built config that names it.
|
|
4
|
+
*
|
|
5
|
+
* Oxlint resolves a plugin specifier against the config file's own location,
|
|
6
|
+
* so this path is the one inside `dist/`, not the one in the source tree.
|
|
7
|
+
*/
|
|
8
|
+
const pluginSpecifier = "../lint/cff-js2-oxlint-plugin.js";
|
|
9
|
+
/**
|
|
10
|
+
* Oxlint's half of the CloudFront Functions JS2 lint setup.
|
|
11
|
+
*
|
|
12
|
+
* It is an override rather than a top-level rule block because a consumer
|
|
13
|
+
* extends this into the config that lints their whole repository, and JS2's
|
|
14
|
+
* restrictions would be wrong applied anywhere but a `.cff.js` file: a project
|
|
15
|
+
* told not to use arrow functions everywhere would be unusable.
|
|
16
|
+
*
|
|
17
|
+
* The rules are the same ones the ESLint config uses, from the same source.
|
|
18
|
+
*/
|
|
19
|
+
export const cloudFrontFunctionsJs2Oxlint = {
|
|
20
|
+
jsPlugins: [{ name: cffJs2PluginName, specifier: pluginSpecifier }],
|
|
21
|
+
overrides: [
|
|
22
|
+
{
|
|
23
|
+
files: ["**/*.cff.js"],
|
|
24
|
+
rules: cffJs2LintRules(),
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=cffjs2.oxlint.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cffjs2.oxlint.config.js","sourceRoot":"","sources":["../../../src/config/oxlint/cffjs2.oxlint.config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,gBAAgB,GAEjB,MAAM,kBAAkB,CAAC;AAgB1B;;;;;GAKG;AACH,MAAM,eAAe,GAAG,kCAAkC,CAAC;AAE3D;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAiB;IACxD,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;IACnE,SAAS,EAAE;QACT;YACE,KAAK,EAAE,CAAC,aAAa,CAAC;YACtB,KAAK,EAAE,eAAe,EAAE;SACzB;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"jsPlugins": [
|
|
3
|
+
{
|
|
4
|
+
"name": "cff-js2",
|
|
5
|
+
"specifier": "../lint/cff-js2-oxlint-plugin.js"
|
|
6
|
+
}
|
|
7
|
+
],
|
|
8
|
+
"overrides": [
|
|
9
|
+
{
|
|
10
|
+
"files": [
|
|
11
|
+
"**/*.cff.js"
|
|
12
|
+
],
|
|
13
|
+
"rules": {
|
|
14
|
+
"object-shorthand": "off",
|
|
15
|
+
"no-eval": "error",
|
|
16
|
+
"no-new-func": "error",
|
|
17
|
+
"no-implied-eval": "error",
|
|
18
|
+
"no-unused-vars": [
|
|
19
|
+
"error",
|
|
20
|
+
{
|
|
21
|
+
"varsIgnorePattern": "^handler$"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"cff-js2/no-unavailable-global": "error",
|
|
25
|
+
"cff-js2/no-import": "error",
|
|
26
|
+
"cff-js2/only-handler-export": "error",
|
|
27
|
+
"cff-js2/only-built-in-require": "error",
|
|
28
|
+
"cff-js2/no-class": "error",
|
|
29
|
+
"cff-js2/no-generator": "error",
|
|
30
|
+
"cff-js2/no-destructuring": "error",
|
|
31
|
+
"cff-js2/no-spread": "error",
|
|
32
|
+
"cff-js2/no-for-of": "error"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/oxlint/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,KAAK,YAAY,GAClB,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/oxlint/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,GAE7B,MAAM,2BAA2B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-local-live-reload.d.ts","sourceRoot":"","sources":["../../../../src/serve/http/live-reload/sim-local-live-reload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sim-local-live-reload.d.ts","sourceRoot":"","sources":["../../../../src/serve/http/live-reload/sim-local-live-reload.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,qCAAqC,CAAC;AAE7C,UAAU,4BAA4B;IACpC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC;CAClC;AAED;;;;;;;;GAQG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA4B;IACvD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;IAKxC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAEnC;IAEF,YAAY,UAAU,EAAE,4BAA4B,EAInD;IAED;;OAEG;IACH,OAAO,IAAI,aAAa,GAAG,SAAS,CAEnC;IAED;;;;;OAKG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAO1B;IAED;;;;;OAKG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAG9B;IAED;;OAEG;IACH,MAAM,IAAI,IAAI,CAEb;IAED;;;;;;;OAOG;IACH,WAAW,IAAI,IAAI,CAElB;IAED,OAAO,CAAC,aAAa;CAQtB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { assertDefined } from "../../../util/type-guard/defined.js";
|
|
1
2
|
import { SimLiveReload } from "./sim-live-reload.js";
|
|
2
3
|
import { SimLiveReloadReport } from "./sim-live-reload-report.js";
|
|
3
4
|
import { simWatch, } from "../../../watch/sim-watch-runtime.js";
|
|
@@ -71,9 +72,7 @@ export class SimLocalLiveReload {
|
|
|
71
72
|
this.reloadChannel();
|
|
72
73
|
}
|
|
73
74
|
reloadChannel() {
|
|
74
|
-
|
|
75
|
-
throw new Error("Live reload is off for this server, serve with { liveReload: true } to use reload()");
|
|
76
|
-
}
|
|
75
|
+
assertDefined(this.liveReload, "Live reload is off for this server, serve with { liveReload: true } to use reload()");
|
|
77
76
|
return this.liveReload;
|
|
78
77
|
}
|
|
79
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-local-live-reload.js","sourceRoot":"","sources":["../../../../src/serve/http/live-reload/sim-local-live-reload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EACL,QAAQ,GAET,MAAM,qCAAqC,CAAC;AAO7C;;;;;;;;GAQG;AACH,MAAM,OAAO,kBAAkB;IACZ,UAAU,CAA4B;IACtC,KAAK,CAAkB;IAExC,6EAA6E;IAC7E,qEAAqE;IACrE,2EAA2E;IAC1D,oBAAoB,GAAG,GAAS,EAAE;QACjD,KAAK,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,CAAC;IACnC,CAAC,CAAC;IAEF,YAAY,UAAwC;QAClD,MAAM,EAAE,OAAO,EAAE,KAAK,GAAG,QAAQ,EAAE,GAAG,UAAU,CAAC;QACjD,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,aAAa,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QAC5D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,IAAY;QAClB,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YAClC,OAAO;QACT,CAAC;QAED,IAAI,mBAAmB,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IACnD,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAQ;QACZ,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAClD,MAAM,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,IAAI,CAAC,aAAa,EAAE,CAAC,MAAM,EAAE,CAAC;IAChC,CAAC;IAED;;;;;;;OAOG;IACH,WAAW;QACT,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IAEO,aAAa;QACnB,
|
|
1
|
+
{"version":3,"file":"sim-local-live-reload.js","sourceRoot":"","sources":["../../../../src/serve/http/live-reload/sim-local-live-reload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EACL,QAAQ,GAET,MAAM,qCAAqC,CAAC;AAO7C;;;;;;;;GAQG;AACH,MAAM,OAAO,kBAAkB;IACZ,UAAU,CAA4B;IACtC,KAAK,CAAkB;IAExC,6EAA6E;IAC7E,qEAAqE;IACrE,2EAA2E;IAC1D,oBAAoB,GAAG,GAAS,EAAE;QACjD,KAAK,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,CAAC;IACnC,CAAC,CAAC;IAEF,YAAY,UAAwC;QAClD,MAAM,EAAE,OAAO,EAAE,KAAK,GAAG,QAAQ,EAAE,GAAG,UAAU,CAAC;QACjD,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,aAAa,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;QAC5D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,OAAO;QACL,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,IAAY;QAClB,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YAClC,OAAO;QACT,CAAC;QAED,IAAI,mBAAmB,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IACnD,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,QAAQ;QACZ,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAClD,MAAM,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,MAAM;QACJ,IAAI,CAAC,aAAa,EAAE,CAAC,MAAM,EAAE,CAAC;IAChC,CAAC;IAED;;;;;;;OAOG;IACH,WAAW;QACT,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;IAEO,aAAa;QACnB,aAAa,CACX,IAAI,CAAC,UAAU,EACf,qFAAqF,CACtF,CAAC;QAEF,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-acm-certificate-validation.d.ts","sourceRoot":"","sources":["../../../../src/service/acm/validation/sim-acm-certificate-validation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sim-acm-certificate-validation.d.ts","sourceRoot":"","sources":["../../../../src/service/acm/validation/sim-acm-certificate-validation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAK/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,UAAU,qCAAqC;IAC7C,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;IACzC,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;CACpD;AAED;;;;;;;;GAQG;AACH,qBAAa,2BAA2B;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;IACjD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA+B;IAC1D,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAgC;IACpE,OAAO,CAAC,IAAI,CAAkC;IAC9C,OAAO,CAAC,yBAAyB,CAAS;IAE1C,YAAY,UAAU,EAAE,qCAAqC,EAG5D;IAED;;;;;OAKG;IACH,0BAA0B,IAAI,IAAI,CAQjC;IAED;;OAEG;IACH,yBAAyB,IAAI,IAAI,CAEhC;IAED;;OAEG;IACH,KAAK,CAAC,WAAW,EAAE,iBAAiB,GAAG,IAAI,CAI1C;IAED;;;OAGG;IACG,MAAM,CAAC,WAAW,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAW1D;IAED;;OAEG;IACH,OAAO,CAAC,cAAc;IAsBtB;;;;;;OAMG;IACH,OAAO,CAAC,iBAAiB;IAwBzB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAa9B;;OAEG;IACH,OAAO,CAAC,6BAA6B;CAKtC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { assertDefined } from "../../../util/type-guard/defined.js";
|
|
1
2
|
import { SimAcmDnsValidationMode } from "./sim-acm-dns-validation-mode.js";
|
|
2
3
|
/**
|
|
3
4
|
* Drives sim ACM Certificate issuance through domain validation.
|
|
@@ -25,10 +26,8 @@ export class SimAcmCertificateValidation {
|
|
|
25
26
|
* so it is rejected rather than silently issuing certificates anyway.
|
|
26
27
|
*/
|
|
27
28
|
alwaysRequireDnsValidation() {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"Use SimAws, so ACM can see Hosted Zones, rather than a standalone SimAcm.");
|
|
31
|
-
}
|
|
29
|
+
assertDefined(this.dnsRecords, "Sim ACM cannot require DNS validation with no sim Route53 to validate against. " +
|
|
30
|
+
"Use SimAws, so ACM can see Hosted Zones, rather than a standalone SimAcm.");
|
|
32
31
|
this.mode = SimAcmDnsValidationMode.always();
|
|
33
32
|
}
|
|
34
33
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-acm-certificate-validation.js","sourceRoot":"","sources":["../../../../src/service/acm/validation/sim-acm-certificate-validation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sim-acm-certificate-validation.js","sourceRoot":"","sources":["../../../../src/service/acm/validation/sim-acm-certificate-validation.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-aws-caller-resolver.d.ts","sourceRoot":"","sources":["../../../../src/service/aws/caller/sim-aws-caller-resolver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sim-aws-caller-resolver.d.ts","sourceRoot":"","sources":["../../../../src/service/aws/caller/sim-aws-caller-resolver.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AAE5F,MAAM,WAAW,gCAAgC;IAC/C,kBAAkB,CAChB,WAAW,EAAE,mBAAmB,CAAC,aAAa,CAAC,EAC/C,GAAG,CAAC,EAAE,IAAI,GACT,wBAAwB,CAAC;CAC7B;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IACpC,QAAQ,CAAC,uBAAuB,EAAE,eAAe,CAAC;IAClD,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvC;AAED;;;;;;;GAOG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAAC,CACG;IAE/C,YAAY,0BAA0B,CAAC,EAAE,gCAAgC,EAExE;IAED;;OAEG;IACH,OAAO,CACL,MAAM,EAAE,YAAY,GAAG,SAAS,EAChC,gBAAgB,EAAE,eAAe,GAChC,oBAAoB,CAuBtB;IAED,OAAO,CAAC,UAAU;IAiClB;;OAEG;IACH,OAAO,CAAC,SAAS;CAMlB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { assertDefined } from "../../../util/type-guard/defined.js";
|
|
1
2
|
/**
|
|
2
3
|
* Resolves caller input at a simulated AWS operation boundary.
|
|
3
4
|
*
|
|
@@ -19,9 +20,7 @@ export class SimAwsCallerResolver {
|
|
|
19
20
|
return this.normalized(caller.principal, caller.identityPolicyPrincipal);
|
|
20
21
|
}
|
|
21
22
|
if (caller?.kind === "credentials") {
|
|
22
|
-
|
|
23
|
-
throw new Error("Simulated credential callers require an IAM credential resolver");
|
|
24
|
-
}
|
|
23
|
+
assertDefined(this.credentialIdentityResolver, "Simulated credential callers require an IAM credential resolver");
|
|
25
24
|
const identity = this.credentialIdentityResolver.resolveCredentials(caller.credentials);
|
|
26
25
|
return this.normalized(identity.principal, identity.identityPolicyPrincipal);
|
|
27
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-aws-caller-resolver.js","sourceRoot":"","sources":["../../../../src/service/aws/caller/sim-aws-caller-resolver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sim-aws-caller-resolver.js","sourceRoot":"","sources":["../../../../src/service/aws/caller/sim-aws-caller-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AA8BpE;;;;;;;GAOG;AACH,MAAM,OAAO,oBAAoB;IACd,0BAA0B,CACI;IAE/C,YAAY,0BAA6D;QACvE,IAAI,CAAC,0BAA0B,GAAG,0BAA0B,CAAC;IAC/D,CAAC;IAED;;OAEG;IACH,OAAO,CACL,MAAgC,EAChC,gBAAiC;QAEjC,IAAI,MAAM,EAAE,IAAI,KAAK,UAAU,EAAE,CAAC;YAChC,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,uBAAuB,CAAC,CAAC;QAC3E,CAAC;QAED,IAAI,MAAM,EAAE,IAAI,KAAK,aAAa,EAAE,CAAC;YACnC,aAAa,CACX,IAAI,CAAC,0BAA0B,EAC/B,iEAAiE,CAClE,CAAC;YAEF,MAAM,QAAQ,GAAG,IAAI,CAAC,0BAA0B,CAAC,kBAAkB,CACjE,MAAM,CAAC,WAAW,CACnB,CAAC;YAEF,OAAO,IAAI,CAAC,UAAU,CACpB,QAAQ,CAAC,SAAS,EAClB,QAAQ,CAAC,uBAAuB,CACjC,CAAC;QACJ,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,IAAI,gBAAgB,CAAC;QAC7C,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAC/C,CAAC;IAEO,UAAU,CAChB,SAA0B,EAC1B,uBAAwC;QAExC,IAAI,SAAS,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;YAC7B,MAAM,iBAAiB,GACrB,uBAAuB,CAAC,IAAI,KAAK,KAAK;gBACpC,CAAC,CAAC,uBAAuB,CAAC,GAAG;gBAC7B,CAAC,CAAC,SAAS,CAAC;YAEhB,OAAO;gBACL,SAAS;gBACT,uBAAuB;gBACvB,GAAG,EAAE,SAAS,CAAC,GAAG;gBAClB,iBAAiB;gBACjB,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC;aACzC,CAAC;QACJ,CAAC;QAED,IAAI,SAAS,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YACjC,OAAO;gBACL,SAAS;gBACT,uBAAuB;gBACvB,OAAO,EAAE,SAAS,CAAC,OAAO;aAC3B,CAAC;QACJ,CAAC;QAED,OAAO;YACL,SAAS;YACT,uBAAuB;SACxB,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,SAAS,CAAC,GAAW;QAC3B,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,OAAO,SAAS,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;YACtD,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,SAAS,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-cdk-bucket-deploy-source.d.ts","sourceRoot":"","sources":["../../../../../../../src/service/cloudformation/cdk/s3/bucket-deployment/source/sim-cdk-bucket-deploy-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,KAAK,EAEV,gBAAgB,EACjB,MAAM,iCAAiC,CAAC;AAGzC;;GAEG;AACH,qBAAa,wBAAwB;IACnC;;OAEG;IACH,+BAA+B,CAC7B,QAAQ,EAAE,cAAc,EACxB,eAAe,EAAE,MAAM,EACvB,aAAa,EAAE,gBAAgB,GAAG,SAAS,GAC1C,MAAM,
|
|
1
|
+
{"version":3,"file":"sim-cdk-bucket-deploy-source.d.ts","sourceRoot":"","sources":["../../../../../../../src/service/cloudformation/cdk/s3/bucket-deployment/source/sim-cdk-bucket-deploy-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,KAAK,EAEV,gBAAgB,EACjB,MAAM,iCAAiC,CAAC;AAGzC;;GAEG;AACH,qBAAa,wBAAwB;IACnC;;OAEG;IACH,+BAA+B,CAC7B,QAAQ,EAAE,cAAc,EACxB,eAAe,EAAE,MAAM,EACvB,aAAa,EAAE,gBAAgB,GAAG,SAAS,GAC1C,MAAM,CAqER;IAED,OAAO,CAAC,qBAAqB;CAU9B"}
|
package/dist/service/cloudformation/cdk/s3/bucket-deployment/source/sim-cdk-bucket-deploy-source.js
CHANGED
|
@@ -23,6 +23,7 @@ export class SimCdkBucketDeploySource {
|
|
|
23
23
|
].join("\n"));
|
|
24
24
|
}
|
|
25
25
|
const fileAsset = this.fileAssetForObjectKey(assetsManifest, sourceObjectKey);
|
|
26
|
+
// eslint-disable-next-line no-restricted-syntax -- `assertDefined` cannot narrow through the optional chain, which the packaging check below relies on, and its message would have to be built on every call rather than only on failure
|
|
26
27
|
if (fileAsset?.source?.path === undefined) {
|
|
27
28
|
const errorMessage = new SimCdkBucketDeployErrorMessage({
|
|
28
29
|
resource,
|