@quantiya/codevibe-claude-plugin 1.0.37 → 1.0.39
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/.claude-plugin/plugin.json +1 -1
- package/bin/codevibe-claude +17 -3
- package/dist/server.js +8 -7
- package/hooks/stop.sh +30 -10
- package/node_modules/@quantiya/codevibe-core/dist/appsync/appsync-client.d.ts +1 -139
- package/node_modules/@quantiya/codevibe-core/dist/appsync/queries.d.ts +0 -5
- package/node_modules/@quantiya/codevibe-core/dist/auth/auth-telemetry.d.ts +64 -29
- package/node_modules/@quantiya/codevibe-core/dist/index.d.ts +0 -4
- package/node_modules/@quantiya/codevibe-core/dist/index.js +33 -194
- package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-manager.d.ts +16 -2
- package/node_modules/@quantiya/codevibe-core/dist/session/session-rekey.d.ts +40 -0
- package/node_modules/@quantiya/codevibe-core/dist/session/session-resume.d.ts +1 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/index.d.ts +0 -2
- package/node_modules/@quantiya/codevibe-core/dist/types/session.d.ts +0 -16
- package/node_modules/@quantiya/codevibe-core/package.json +1 -1
- package/node_modules/body-parser/README.md +18 -18
- package/node_modules/body-parser/index.js +6 -15
- package/node_modules/body-parser/lib/read.js +17 -20
- package/node_modules/body-parser/lib/types/json.js +8 -16
- package/node_modules/body-parser/lib/types/raw.js +3 -4
- package/node_modules/body-parser/lib/types/text.js +3 -4
- package/node_modules/body-parser/lib/types/urlencoded.js +8 -8
- package/node_modules/body-parser/lib/utils.js +11 -9
- package/node_modules/body-parser/package.json +2 -2
- package/node_modules/content-disposition/README.md +7 -8
- package/node_modules/content-disposition/index.js +118 -40
- package/node_modules/content-disposition/package.json +8 -11
- package/node_modules/express/Readme.md +39 -29
- package/node_modules/express/lib/application.js +1 -1
- package/node_modules/express/lib/request.js +5 -6
- package/node_modules/express/lib/response.js +14 -0
- package/node_modules/express/lib/utils.js +3 -1
- package/node_modules/express/package.json +6 -5
- package/node_modules/finalhandler/HISTORY.md +6 -0
- package/node_modules/finalhandler/README.md +26 -23
- package/node_modules/finalhandler/package.json +13 -9
- package/node_modules/graphql/execution/execute.d.ts +14 -1
- package/node_modules/graphql/execution/execute.js +63 -13
- package/node_modules/graphql/execution/execute.mjs +63 -13
- package/node_modules/graphql/execution/subscribe.js +1 -0
- package/node_modules/graphql/execution/subscribe.mjs +2 -0
- package/node_modules/graphql/execution/values.js +4 -4
- package/node_modules/graphql/execution/values.mjs +4 -4
- package/node_modules/graphql/index.d.ts +1 -0
- package/node_modules/graphql/language/ast.d.ts +10 -1
- package/node_modules/graphql/language/ast.js +8 -1
- package/node_modules/graphql/language/ast.mjs +8 -1
- package/node_modules/graphql/language/directiveLocation.d.ts +1 -0
- package/node_modules/graphql/language/directiveLocation.js +1 -0
- package/node_modules/graphql/language/directiveLocation.mjs +1 -0
- package/node_modules/graphql/language/index.d.ts +1 -0
- package/node_modules/graphql/language/kinds.d.ts +1 -0
- package/node_modules/graphql/language/kinds.js +1 -0
- package/node_modules/graphql/language/kinds.mjs +1 -0
- package/node_modules/graphql/language/parser.d.ts +14 -0
- package/node_modules/graphql/language/parser.js +33 -0
- package/node_modules/graphql/language/parser.mjs +33 -0
- package/node_modules/graphql/language/predicates.js +3 -1
- package/node_modules/graphql/language/predicates.mjs +5 -1
- package/node_modules/graphql/language/printer.js +13 -1
- package/node_modules/graphql/language/printer.mjs +13 -1
- package/node_modules/graphql/package.json +1 -1
- package/node_modules/graphql/type/directives.d.ts +9 -1
- package/node_modules/graphql/type/directives.js +10 -1
- package/node_modules/graphql/type/directives.mjs +10 -1
- package/node_modules/graphql/type/introspection.js +24 -1
- package/node_modules/graphql/type/introspection.mjs +24 -1
- package/node_modules/graphql/utilities/buildASTSchema.js +4 -0
- package/node_modules/graphql/utilities/buildASTSchema.mjs +4 -0
- package/node_modules/graphql/utilities/buildClientSchema.js +1 -0
- package/node_modules/graphql/utilities/buildClientSchema.mjs +1 -0
- package/node_modules/graphql/utilities/coerceInputValue.js +2 -2
- package/node_modules/graphql/utilities/coerceInputValue.mjs +2 -2
- package/node_modules/graphql/utilities/extendSchema.js +58 -3
- package/node_modules/graphql/utilities/extendSchema.mjs +58 -3
- package/node_modules/graphql/utilities/getIntrospectionQuery.d.ts +16 -0
- package/node_modules/graphql/utilities/getIntrospectionQuery.js +31 -38
- package/node_modules/graphql/utilities/getIntrospectionQuery.mjs +31 -38
- package/node_modules/graphql/utilities/introspectionFromSchema.js +1 -0
- package/node_modules/graphql/utilities/introspectionFromSchema.mjs +1 -0
- package/node_modules/graphql/utilities/printSchema.js +1 -0
- package/node_modules/graphql/utilities/printSchema.mjs +1 -0
- package/node_modules/graphql/utilities/valueFromAST.js +12 -2
- package/node_modules/graphql/utilities/valueFromAST.mjs +12 -2
- package/node_modules/graphql/validation/rules/KnownDirectivesRule.js +4 -0
- package/node_modules/graphql/validation/rules/KnownDirectivesRule.mjs +4 -0
- package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.js +12 -0
- package/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.mjs +12 -0
- package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.js +5 -11
- package/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.mjs +5 -11
- package/node_modules/graphql/validation/validate.js +12 -0
- package/node_modules/graphql/validation/validate.mjs +13 -2
- package/node_modules/graphql/version.js +2 -2
- package/node_modules/graphql/version.mjs +2 -2
- package/node_modules/hasown/CHANGELOG.md +11 -0
- package/node_modules/hasown/eslint.config.mjs +6 -0
- package/node_modules/hasown/index.d.ts +1 -0
- package/node_modules/hasown/package.json +14 -14
- package/node_modules/iconv-lite/lib/index.d.ts +114 -26
- package/node_modules/iconv-lite/lib/index.js +39 -40
- package/node_modules/iconv-lite/package.json +13 -2
- package/node_modules/iconv-lite/types/encodings.d.ts +423 -0
- package/node_modules/node-abi/abi_registry.json +10 -3
- package/node_modules/{semver → node-abi/node_modules/semver}/README.md +19 -4
- package/node_modules/{semver → node-abi/node_modules/semver}/bin/semver.js +14 -10
- package/node_modules/node-abi/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/{semver → node-abi/node_modules/semver}/index.js +2 -0
- package/node_modules/{semver → node-abi/node_modules/semver}/internal/re.js +1 -1
- package/node_modules/{semver → node-abi/node_modules/semver}/package.json +3 -3
- package/node_modules/{semver → node-abi/node_modules/semver}/range.bnf +5 -4
- package/node_modules/node-abi/package.json +1 -1
- package/node_modules/path-to-regexp/Readme.md +3 -3
- package/node_modules/path-to-regexp/dist/index.d.ts +3 -0
- package/node_modules/path-to-regexp/dist/index.js +215 -193
- package/node_modules/path-to-regexp/dist/index.js.map +1 -1
- package/node_modules/path-to-regexp/package.json +2 -2
- package/node_modules/qs/.editorconfig +1 -1
- package/node_modules/qs/.github/SECURITY.md +11 -0
- package/node_modules/qs/.github/THREAT_MODEL.md +78 -0
- package/node_modules/qs/CHANGELOG.md +190 -0
- package/node_modules/qs/README.md +29 -4
- package/node_modules/qs/dist/qs.js +21 -21
- package/node_modules/qs/eslint.config.mjs +56 -0
- package/node_modules/qs/lib/parse.js +94 -49
- package/node_modules/qs/lib/utils.js +85 -11
- package/node_modules/qs/package.json +10 -9
- package/node_modules/qs/test/parse.js +391 -13
- package/node_modules/qs/test/stringify.js +16 -3
- package/node_modules/qs/test/utils.js +173 -3
- package/node_modules/send/package.json +11 -8
- package/node_modules/serve-static/README.md +23 -23
- package/node_modules/serve-static/package.json +6 -3
- package/node_modules/side-channel-list/CHANGELOG.md +25 -4
- package/node_modules/side-channel-list/index.js +1 -3
- package/node_modules/side-channel-list/package.json +8 -8
- package/node_modules/side-channel-list/test/index.js +50 -0
- package/node_modules/uuid/dist/v35.js +3 -0
- package/node_modules/uuid/dist/v6.js +3 -0
- package/node_modules/uuid/dist-node/v35.js +3 -0
- package/node_modules/uuid/dist-node/v6.js +3 -0
- package/node_modules/uuid/package.json +1 -1
- package/node_modules/ws/index.js +15 -6
- package/node_modules/ws/lib/constants.js +1 -0
- package/node_modules/ws/lib/permessage-deflate.js +6 -6
- package/node_modules/ws/lib/websocket-server.js +10 -6
- package/node_modules/ws/lib/websocket.js +19 -14
- package/node_modules/ws/package.json +4 -3
- package/node_modules/ws/wrapper.mjs +14 -1
- package/package.json +2 -2
- package/node_modules/@quantiya/codevibe-core/dist/appsync/__tests__/appsync-client.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/audit-keys/__tests__/audit-keys-parity.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/audit-keys/index.d.ts +0 -41
- package/node_modules/@quantiya/codevibe-core/dist/auth/__tests__/auth-telemetry.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-bootstrap.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-failure-recourse.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-save.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-seat-picker.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-telemetry.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-test-agents.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-types.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/setup-wizard.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/__tests__/v1-options.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/detect-agents.d.ts +0 -56
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/index.d.ts +0 -3
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/orchestration-cli.d.ts +0 -12
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-bootstrap.d.ts +0 -146
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-failure-recourse.d.ts +0 -23
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-save.d.ts +0 -47
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-seat-picker.d.ts +0 -72
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-telemetry.d.ts +0 -54
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-test-agents.d.ts +0 -108
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-types.d.ts +0 -140
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/setup-wizard.d.ts +0 -57
- package/node_modules/@quantiya/codevibe-core/dist/orchestration/v1-options.d.ts +0 -108
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/__tests__/integration.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/__tests__/mocks.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/__tests__/output-parser.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/__tests__/registry.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/__tests__/subprocess.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/index.d.ts +0 -15
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/mocks.d.ts +0 -80
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/output-parser.d.ts +0 -95
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/provider.d.ts +0 -153
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/__tests__/claude-live-smoke.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/__tests__/claude.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/__tests__/codex-live-smoke.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/__tests__/codex.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/__tests__/gemini-live-smoke.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/__tests__/gemini.test.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/claude.d.ts +0 -59
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/codex.d.ts +0 -67
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/common.d.ts +0 -25
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/providers/gemini.d.ts +0 -108
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/registry.d.ts +0 -87
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/subprocess.d.ts +0 -117
- package/node_modules/@quantiya/codevibe-core/dist/reviewer/types.d.ts +0 -101
- package/node_modules/@quantiya/codevibe-core/dist/types/orchestration.d.ts +0 -57
- package/node_modules/@quantiya/codevibe-core/dist/types/reviewer.d.ts +0 -67
- package/node_modules/content-disposition/HISTORY.md +0 -72
- package/node_modules/express/History.md +0 -3858
- package/node_modules/hasown/.eslintrc +0 -5
- package/node_modules/iconv-lite/Changelog.md +0 -236
- package/node_modules/qs/.eslintrc +0 -39
- package/node_modules/send/HISTORY.md +0 -580
- package/node_modules/serve-static/HISTORY.md +0 -516
- /package/node_modules/{semver → node-abi/node_modules/semver}/LICENSE +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/classes/comparator.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/classes/index.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/classes/range.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/classes/semver.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/clean.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/cmp.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/coerce.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/compare-build.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/compare-loose.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/compare.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/diff.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/eq.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/gt.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/gte.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/inc.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/lt.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/lte.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/major.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/minor.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/neq.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/parse.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/patch.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/prerelease.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/rcompare.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/rsort.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/satisfies.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/sort.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/functions/valid.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/constants.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/debug.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/identifiers.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/lrucache.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/internal/parse-options.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/preload.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/gtr.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/intersects.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/ltr.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/max-satisfying.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/min-satisfying.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/min-version.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/outside.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/simplify.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/subset.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/to-comparators.js +0 -0
- /package/node_modules/{semver → node-abi/node_modules/semver}/ranges/valid.js +0 -0
- /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/index.js +0 -0
- /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/license +0 -0
- /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/package.json +0 -0
- /package/node_modules/{strip-json-comments → rc/node_modules/strip-json-comments}/readme.md +0 -0
|
@@ -31,6 +31,7 @@ test('merge()', function (t) {
|
|
|
31
31
|
t.deepEqual(noOptionsNonObjectSource, { foo: 'baz', bar: true });
|
|
32
32
|
|
|
33
33
|
var func = function f() {};
|
|
34
|
+
func();
|
|
34
35
|
t.deepEqual(
|
|
35
36
|
utils.merge(func, { foo: 'bar' }),
|
|
36
37
|
[func, { foo: 'bar' }],
|
|
@@ -68,6 +69,93 @@ test('merge()', function (t) {
|
|
|
68
69
|
}
|
|
69
70
|
);
|
|
70
71
|
|
|
72
|
+
t.test('with overflow objects (from arrayLimit)', function (st) {
|
|
73
|
+
// arrayLimit is max index, so with limit 0, max index 0 is allowed (1 element)
|
|
74
|
+
// To create overflow, need 2+ elements with limit 0, or 3+ with limit 1, etc.
|
|
75
|
+
st.test('merges primitive into overflow object at next index', function (s2t) {
|
|
76
|
+
// Create an overflow object via combine: 3 elements (indices 0-2) with limit 0
|
|
77
|
+
var overflow = utils.combine(['a', 'b'], 'c', 0, false);
|
|
78
|
+
s2t.ok(utils.isOverflow(overflow), 'overflow object is marked');
|
|
79
|
+
var merged = utils.merge(overflow, 'd');
|
|
80
|
+
s2t.deepEqual(merged, { 0: 'a', 1: 'b', 2: 'c', 3: 'd' }, 'adds primitive at next numeric index');
|
|
81
|
+
s2t.end();
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
st.test('merges primitive into regular object with numeric keys normally', function (s2t) {
|
|
85
|
+
var obj = { 0: 'a', 1: 'b' };
|
|
86
|
+
s2t.notOk(utils.isOverflow(obj), 'plain object is not marked as overflow');
|
|
87
|
+
var merged = utils.merge(obj, 'c');
|
|
88
|
+
s2t.deepEqual(merged, { 0: 'a', 1: 'b', c: true }, 'adds primitive as key (not at next index)');
|
|
89
|
+
s2t.end();
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
st.test('merges primitive into object with non-numeric keys normally', function (s2t) {
|
|
93
|
+
var obj = { foo: 'bar' };
|
|
94
|
+
var merged = utils.merge(obj, 'baz');
|
|
95
|
+
s2t.deepEqual(merged, { foo: 'bar', baz: true }, 'adds primitive as key with value true');
|
|
96
|
+
s2t.end();
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
st.test('with strictMerge, wraps object and primitive in array', function (s2t) {
|
|
100
|
+
var obj = { foo: 'bar' };
|
|
101
|
+
var merged = utils.merge(obj, 'baz', { strictMerge: true });
|
|
102
|
+
s2t.deepEqual(merged, [{ foo: 'bar' }, 'baz'], 'wraps in array with strictMerge');
|
|
103
|
+
s2t.end();
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
st.test('merges overflow object into primitive', function (s2t) {
|
|
107
|
+
// Create an overflow object via combine: 2 elements (indices 0-1) with limit 0
|
|
108
|
+
var overflow = utils.combine(['a'], 'b', 0, false);
|
|
109
|
+
s2t.ok(utils.isOverflow(overflow), 'overflow object is marked');
|
|
110
|
+
var merged = utils.merge('c', overflow);
|
|
111
|
+
s2t.ok(utils.isOverflow(merged), 'result is also marked as overflow');
|
|
112
|
+
s2t.deepEqual(merged, { 0: 'c', 1: 'a', 2: 'b' }, 'creates object with primitive at 0, source values shifted');
|
|
113
|
+
s2t.end();
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
st.test('merges overflow object into primitive with plainObjects', function (s2t) {
|
|
117
|
+
var overflow = utils.combine(['a'], 'b', 0, false);
|
|
118
|
+
s2t.ok(utils.isOverflow(overflow), 'overflow object is marked');
|
|
119
|
+
var merged = utils.merge('c', overflow, { plainObjects: true });
|
|
120
|
+
s2t.ok(utils.isOverflow(merged), 'result is also marked as overflow');
|
|
121
|
+
s2t.deepEqual(merged, { __proto__: null, 0: 'c', 1: 'a', 2: 'b' }, 'creates null-proto object with primitive at 0');
|
|
122
|
+
s2t.end();
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
st.test('merges overflow object with multiple values into primitive', function (s2t) {
|
|
126
|
+
// Create an overflow object via combine: 3 elements (indices 0-2) with limit 0
|
|
127
|
+
var overflow = utils.combine(['b', 'c'], 'd', 0, false);
|
|
128
|
+
s2t.ok(utils.isOverflow(overflow), 'overflow object is marked');
|
|
129
|
+
var merged = utils.merge('a', overflow);
|
|
130
|
+
s2t.deepEqual(merged, { 0: 'a', 1: 'b', 2: 'c', 3: 'd' }, 'shifts all source indices by 1');
|
|
131
|
+
s2t.end();
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
st.test('merges regular object into primitive as array', function (s2t) {
|
|
135
|
+
var obj = { foo: 'bar' };
|
|
136
|
+
var merged = utils.merge('a', obj);
|
|
137
|
+
s2t.deepEqual(merged, ['a', { foo: 'bar' }], 'creates array with primitive and object');
|
|
138
|
+
s2t.end();
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
st.test('merges primitive into array that exceeds arrayLimit', function (s2t) {
|
|
142
|
+
var arr = ['a', 'b', 'c'];
|
|
143
|
+
var merged = utils.merge(arr, 'd', { arrayLimit: 1 });
|
|
144
|
+
s2t.ok(utils.isOverflow(merged), 'result is marked as overflow');
|
|
145
|
+
s2t.deepEqual(merged, { 0: 'a', 1: 'b', 2: 'c', 3: 'd' }, 'converts to overflow object with primitive appended');
|
|
146
|
+
s2t.end();
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
st.test('merges array into primitive that exceeds arrayLimit', function (s2t) {
|
|
150
|
+
var merged = utils.merge('a', ['b', 'c'], { arrayLimit: 1 });
|
|
151
|
+
s2t.ok(utils.isOverflow(merged), 'result is marked as overflow');
|
|
152
|
+
s2t.deepEqual(merged, { 0: 'a', 1: 'b', 2: 'c' }, 'converts to overflow object');
|
|
153
|
+
s2t.end();
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
st.end();
|
|
157
|
+
});
|
|
158
|
+
|
|
71
159
|
t.end();
|
|
72
160
|
});
|
|
73
161
|
|
|
@@ -132,6 +220,85 @@ test('combine()', function (t) {
|
|
|
132
220
|
st.end();
|
|
133
221
|
});
|
|
134
222
|
|
|
223
|
+
t.test('with arrayLimit', function (st) {
|
|
224
|
+
st.test('under the limit', function (s2t) {
|
|
225
|
+
var combined = utils.combine(['a', 'b'], 'c', 10, false);
|
|
226
|
+
s2t.deepEqual(combined, ['a', 'b', 'c'], 'returns array when under limit');
|
|
227
|
+
s2t.ok(Array.isArray(combined), 'result is an array');
|
|
228
|
+
s2t.end();
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
st.test('exactly at the limit stays as array', function (s2t) {
|
|
232
|
+
var combined = utils.combine(['a', 'b'], 'c', 3, false);
|
|
233
|
+
s2t.deepEqual(combined, ['a', 'b', 'c'], 'stays as array when count equals limit');
|
|
234
|
+
s2t.ok(Array.isArray(combined), 'result is an array');
|
|
235
|
+
s2t.end();
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
st.test('over the limit', function (s2t) {
|
|
239
|
+
var combined = utils.combine(['a', 'b', 'c'], 'd', 3, false);
|
|
240
|
+
s2t.deepEqual(combined, { 0: 'a', 1: 'b', 2: 'c', 3: 'd' }, 'converts to object when over limit');
|
|
241
|
+
s2t.notOk(Array.isArray(combined), 'result is not an array');
|
|
242
|
+
s2t.end();
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
st.test('with arrayLimit 1', function (s2t) {
|
|
246
|
+
var combined = utils.combine([], 'a', 1, false);
|
|
247
|
+
s2t.deepEqual(combined, ['a'], 'stays as array when count equals limit');
|
|
248
|
+
s2t.ok(Array.isArray(combined), 'result is an array');
|
|
249
|
+
s2t.end();
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
st.test('with arrayLimit 0 converts single element to object', function (s2t) {
|
|
253
|
+
var combined = utils.combine([], 'a', 0, false);
|
|
254
|
+
s2t.deepEqual(combined, { 0: 'a' }, 'converts to object when count exceeds limit');
|
|
255
|
+
s2t.notOk(Array.isArray(combined), 'result is not an array');
|
|
256
|
+
s2t.end();
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
st.test('with arrayLimit 0 and two elements converts to object', function (s2t) {
|
|
260
|
+
var combined = utils.combine(['a'], 'b', 0, false);
|
|
261
|
+
s2t.deepEqual(combined, { 0: 'a', 1: 'b' }, 'converts to object when count exceeds limit');
|
|
262
|
+
s2t.notOk(Array.isArray(combined), 'result is not an array');
|
|
263
|
+
s2t.end();
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
st.test('with plainObjects option', function (s2t) {
|
|
267
|
+
var combined = utils.combine(['a', 'b'], 'c', 1, true);
|
|
268
|
+
var expected = { __proto__: null, 0: 'a', 1: 'b', 2: 'c' };
|
|
269
|
+
s2t.deepEqual(combined, expected, 'converts to object with null prototype');
|
|
270
|
+
s2t.equal(Object.getPrototypeOf(combined), null, 'result has null prototype when plainObjects is true');
|
|
271
|
+
s2t.end();
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
st.end();
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
t.test('with existing overflow object', function (st) {
|
|
278
|
+
st.test('adds to existing overflow object at next index', function (s2t) {
|
|
279
|
+
// Create overflow object first via combine: 3 elements (indices 0-2) with limit 0
|
|
280
|
+
var overflow = utils.combine(['a', 'b'], 'c', 0, false);
|
|
281
|
+
s2t.ok(utils.isOverflow(overflow), 'initial object is marked as overflow');
|
|
282
|
+
|
|
283
|
+
var combined = utils.combine(overflow, 'd', 10, false);
|
|
284
|
+
s2t.equal(combined, overflow, 'returns the same object (mutated)');
|
|
285
|
+
s2t.deepEqual(combined, { 0: 'a', 1: 'b', 2: 'c', 3: 'd' }, 'adds value at next numeric index');
|
|
286
|
+
s2t.end();
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
st.test('does not treat plain object with numeric keys as overflow', function (s2t) {
|
|
290
|
+
var plainObj = { 0: 'a', 1: 'b' };
|
|
291
|
+
s2t.notOk(utils.isOverflow(plainObj), 'plain object is not marked as overflow');
|
|
292
|
+
|
|
293
|
+
// combine treats this as a regular value, not an overflow object to append to
|
|
294
|
+
var combined = utils.combine(plainObj, 'c', 10, false);
|
|
295
|
+
s2t.deepEqual(combined, [{ 0: 'a', 1: 'b' }, 'c'], 'concatenates as regular values');
|
|
296
|
+
s2t.end();
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
st.end();
|
|
300
|
+
});
|
|
301
|
+
|
|
135
302
|
t.end();
|
|
136
303
|
});
|
|
137
304
|
|
|
@@ -234,7 +401,9 @@ test('encode', function (t) {
|
|
|
234
401
|
});
|
|
235
402
|
|
|
236
403
|
test('isBuffer()', function (t) {
|
|
237
|
-
|
|
404
|
+
var fn = function () {};
|
|
405
|
+
fn();
|
|
406
|
+
forEach([null, undefined, true, false, '', 'abc', 42, 0, NaN, {}, [], fn, /a/g], function (x) {
|
|
238
407
|
t.equal(utils.isBuffer(x), false, inspect(x) + ' is not a buffer');
|
|
239
408
|
});
|
|
240
409
|
|
|
@@ -244,8 +413,9 @@ test('isBuffer()', function (t) {
|
|
|
244
413
|
var saferBuffer = SaferBuffer.from('abc');
|
|
245
414
|
t.equal(utils.isBuffer(saferBuffer), true, 'SaferBuffer instance is a buffer');
|
|
246
415
|
|
|
247
|
-
var buffer =
|
|
248
|
-
t.
|
|
416
|
+
var buffer = SaferBuffer.from('abc');
|
|
417
|
+
t.notEqual(saferBuffer, buffer, 'different buffer instances');
|
|
418
|
+
t.equal(utils.isBuffer(buffer), true, 'another Buffer instance is a buffer');
|
|
249
419
|
t.end();
|
|
250
420
|
});
|
|
251
421
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "send",
|
|
3
3
|
"description": "Better streaming static file server with Range and conditional-GET support",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.1",
|
|
5
5
|
"author": "TJ Holowaychuk <tj@vision-media.ca>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
@@ -10,39 +10,42 @@
|
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"repository": "pillarjs/send",
|
|
13
|
+
"funding": {
|
|
14
|
+
"type": "opencollective",
|
|
15
|
+
"url": "https://opencollective.com/express"
|
|
16
|
+
},
|
|
13
17
|
"keywords": [
|
|
14
18
|
"static",
|
|
15
19
|
"file",
|
|
16
20
|
"server"
|
|
17
21
|
],
|
|
18
22
|
"dependencies": {
|
|
19
|
-
"debug": "^4.3
|
|
23
|
+
"debug": "^4.4.3",
|
|
20
24
|
"encodeurl": "^2.0.0",
|
|
21
25
|
"escape-html": "^1.0.3",
|
|
22
26
|
"etag": "^1.8.1",
|
|
23
27
|
"fresh": "^2.0.0",
|
|
24
|
-
"http-errors": "^2.0.
|
|
25
|
-
"mime-types": "^3.0.
|
|
28
|
+
"http-errors": "^2.0.1",
|
|
29
|
+
"mime-types": "^3.0.2",
|
|
26
30
|
"ms": "^2.1.3",
|
|
27
31
|
"on-finished": "^2.4.1",
|
|
28
32
|
"range-parser": "^1.2.1",
|
|
29
|
-
"statuses": "^2.0.
|
|
33
|
+
"statuses": "^2.0.2"
|
|
30
34
|
},
|
|
31
35
|
"devDependencies": {
|
|
32
36
|
"after": "^0.8.2",
|
|
33
37
|
"eslint": "7.32.0",
|
|
34
38
|
"eslint-config-standard": "14.1.1",
|
|
35
|
-
"eslint-plugin-import": "2.
|
|
39
|
+
"eslint-plugin-import": "2.32.0",
|
|
36
40
|
"eslint-plugin-markdown": "2.2.1",
|
|
37
41
|
"eslint-plugin-node": "11.1.0",
|
|
38
42
|
"eslint-plugin-promise": "5.2.0",
|
|
39
43
|
"eslint-plugin-standard": "4.1.0",
|
|
40
44
|
"mocha": "^10.7.0",
|
|
41
45
|
"nyc": "^17.0.0",
|
|
42
|
-
"supertest": "6.
|
|
46
|
+
"supertest": "6.3.4"
|
|
43
47
|
},
|
|
44
48
|
"files": [
|
|
45
|
-
"HISTORY.md",
|
|
46
49
|
"LICENSE",
|
|
47
50
|
"README.md",
|
|
48
51
|
"index.js"
|
|
@@ -18,7 +18,7 @@ $ npm install serve-static
|
|
|
18
18
|
## API
|
|
19
19
|
|
|
20
20
|
```js
|
|
21
|
-
|
|
21
|
+
const serveStatic = require('serve-static')
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
### serveStatic(root, options)
|
|
@@ -132,15 +132,15 @@ the arguments are:
|
|
|
132
132
|
### Serve files with vanilla node.js http server
|
|
133
133
|
|
|
134
134
|
```js
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
const finalhandler = require('finalhandler')
|
|
136
|
+
const http = require('http')
|
|
137
|
+
const serveStatic = require('serve-static')
|
|
138
138
|
|
|
139
139
|
// Serve up public/ftp folder
|
|
140
|
-
|
|
140
|
+
const serve = serveStatic('public/ftp', { index: ['index.html', 'index.htm'] })
|
|
141
141
|
|
|
142
142
|
// Create server
|
|
143
|
-
|
|
143
|
+
const server = http.createServer((req, res) => {
|
|
144
144
|
serve(req, res, finalhandler(req, res))
|
|
145
145
|
})
|
|
146
146
|
|
|
@@ -151,13 +151,13 @@ server.listen(3000)
|
|
|
151
151
|
### Serve all files as downloads
|
|
152
152
|
|
|
153
153
|
```js
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
const contentDisposition = require('content-disposition')
|
|
155
|
+
const finalhandler = require('finalhandler')
|
|
156
|
+
const http = require('http')
|
|
157
|
+
const serveStatic = require('serve-static')
|
|
158
158
|
|
|
159
159
|
// Serve up public/ftp folder
|
|
160
|
-
|
|
160
|
+
const serve = serveStatic('public/ftp', {
|
|
161
161
|
index: false,
|
|
162
162
|
setHeaders: setHeaders
|
|
163
163
|
})
|
|
@@ -168,7 +168,7 @@ function setHeaders (res, path) {
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
// Create server
|
|
171
|
-
|
|
171
|
+
const server = http.createServer((req, res) => {
|
|
172
172
|
serve(req, res, finalhandler(req, res))
|
|
173
173
|
})
|
|
174
174
|
|
|
@@ -183,10 +183,10 @@ server.listen(3000)
|
|
|
183
183
|
This is a simple example of using Express.
|
|
184
184
|
|
|
185
185
|
```js
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
const express = require('express')
|
|
187
|
+
const serveStatic = require('serve-static')
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
const app = express()
|
|
190
190
|
|
|
191
191
|
app.use(serveStatic('public/ftp', { index: ['default.html', 'default.htm'] }))
|
|
192
192
|
app.listen(3000)
|
|
@@ -199,11 +199,11 @@ Files are searched for in `public-optimized/` first, then `public/` second
|
|
|
199
199
|
as a fallback.
|
|
200
200
|
|
|
201
201
|
```js
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
202
|
+
const express = require('express')
|
|
203
|
+
const path = require('path')
|
|
204
|
+
const serveStatic = require('serve-static')
|
|
205
205
|
|
|
206
|
-
|
|
206
|
+
const app = express()
|
|
207
207
|
|
|
208
208
|
app.use(serveStatic(path.join(__dirname, 'public-optimized')))
|
|
209
209
|
app.use(serveStatic(path.join(__dirname, 'public')))
|
|
@@ -217,11 +217,11 @@ file. In this example, HTML files are not cached, while everything else
|
|
|
217
217
|
is for 1 day.
|
|
218
218
|
|
|
219
219
|
```js
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
220
|
+
const express = require('express')
|
|
221
|
+
const path = require('path')
|
|
222
|
+
const serveStatic = require('serve-static')
|
|
223
223
|
|
|
224
|
-
|
|
224
|
+
const app = express()
|
|
225
225
|
|
|
226
226
|
app.use(serveStatic(path.join(__dirname, 'public'), {
|
|
227
227
|
maxAge: '1d',
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "serve-static",
|
|
3
3
|
"description": "Serve static files",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "expressjs/serve-static",
|
|
8
|
+
"funding": {
|
|
9
|
+
"type": "opencollective",
|
|
10
|
+
"url": "https://opencollective.com/express"
|
|
11
|
+
},
|
|
8
12
|
"dependencies": {
|
|
9
13
|
"encodeurl": "^2.0.0",
|
|
10
14
|
"escape-html": "^1.0.3",
|
|
@@ -14,7 +18,7 @@
|
|
|
14
18
|
"devDependencies": {
|
|
15
19
|
"eslint": "7.32.0",
|
|
16
20
|
"eslint-config-standard": "14.1.1",
|
|
17
|
-
"eslint-plugin-import": "2.
|
|
21
|
+
"eslint-plugin-import": "2.32.0",
|
|
18
22
|
"eslint-plugin-markdown": "2.2.1",
|
|
19
23
|
"eslint-plugin-node": "11.1.0",
|
|
20
24
|
"eslint-plugin-promise": "5.2.0",
|
|
@@ -25,7 +29,6 @@
|
|
|
25
29
|
},
|
|
26
30
|
"files": [
|
|
27
31
|
"LICENSE",
|
|
28
|
-
"HISTORY.md",
|
|
29
32
|
"index.js"
|
|
30
33
|
],
|
|
31
34
|
"engines": {
|
|
@@ -5,11 +5,32 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [v1.0.1](https://github.com/ljharb/side-channel-list.git
|
|
9
|
+
/compare/v1.0.0...v1.0.1) - 2026-04-08
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- [Fix] `delete`: do not reset the list when deleting the head node of a multi-node list [`#3`](https://github.com/ljharb/side-channel-list.git
|
|
14
|
+
/issues/3)
|
|
15
|
+
|
|
16
|
+
### Commits
|
|
17
|
+
|
|
18
|
+
- [actions] update workflows [`9e79e6b`](https://github.com/ljharb/side-channel-list.git
|
|
19
|
+
/commit/9e79e6bf845532fafbf03b547429fe4f737214a3)
|
|
20
|
+
- [Deps] update `@arethetypeswrong/cli`, `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/tape`, `eslint`, `npmignore` [`babf3ca`](https://github.com/ljharb/side-channel-list.git
|
|
21
|
+
/commit/babf3ca4849d2fd893a470a6b82c62a80ccc9307)
|
|
22
|
+
- [Deps] update `object-inspect` [`9f0f4b8`](https://github.com/ljharb/side-channel-list.git
|
|
23
|
+
/commit/9f0f4b88ff2aa8b7b7c9e589ac1513f133d64b9f)
|
|
24
|
+
|
|
8
25
|
## v1.0.0 - 2024-12-10
|
|
9
26
|
|
|
10
27
|
### Commits
|
|
11
28
|
|
|
12
|
-
- Initial implementation, tests, readme, types [`5d6baee`](https://github.com/ljharb/side-channel-list
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
|
|
29
|
+
- Initial implementation, tests, readme, types [`5d6baee`](https://github.com/ljharb/side-channel-list.git
|
|
30
|
+
/commit/5d6baee5c9054a1238007f5a1dfc109a7a816251)
|
|
31
|
+
- Initial commit [`3ae784c`](https://github.com/ljharb/side-channel-list.git
|
|
32
|
+
/commit/3ae784c63a47895fbaeed2a91ab54a8029a7a100)
|
|
33
|
+
- npm init [`07055a4`](https://github.com/ljharb/side-channel-list.git
|
|
34
|
+
/commit/07055a4d139895565b199dba5fe2479c1a1b9e28)
|
|
35
|
+
- Only apps should have lockfiles [`9573058`](https://github.com/ljharb/side-channel-list.git
|
|
36
|
+
/commit/9573058a47494e2d68f8c6c77b5d7fbe441949c1)
|
|
@@ -84,9 +84,8 @@ module.exports = function getSideChannelList() {
|
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
'delete': function (key) {
|
|
87
|
-
var root = $o && $o.next;
|
|
88
87
|
var deletedNode = listDelete($o, key);
|
|
89
|
-
if (deletedNode &&
|
|
88
|
+
if (deletedNode && $o && !$o.next) {
|
|
90
89
|
$o = void undefined;
|
|
91
90
|
}
|
|
92
91
|
return !!deletedNode;
|
|
@@ -108,6 +107,5 @@ module.exports = function getSideChannelList() {
|
|
|
108
107
|
listSet(/** @type {NonNullable<typeof $o>} */ ($o), key, value);
|
|
109
108
|
}
|
|
110
109
|
};
|
|
111
|
-
// @ts-expect-error TODO: figure out why this is erroring
|
|
112
110
|
return channel;
|
|
113
111
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "side-channel-list",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Store information about any JS value in a side channel, using a linked list",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -38,21 +38,21 @@
|
|
|
38
38
|
"homepage": "https://github.com/ljharb/side-channel-list#readme",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"es-errors": "^1.3.0",
|
|
41
|
-
"object-inspect": "^1.13.
|
|
41
|
+
"object-inspect": "^1.13.4"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@arethetypeswrong/cli": "^0.
|
|
45
|
-
"@ljharb/eslint-config": "^
|
|
46
|
-
"@ljharb/tsconfig": "^0.
|
|
44
|
+
"@arethetypeswrong/cli": "^0.18.2",
|
|
45
|
+
"@ljharb/eslint-config": "^22.2.2",
|
|
46
|
+
"@ljharb/tsconfig": "^0.3.2",
|
|
47
47
|
"@types/object-inspect": "^1.13.0",
|
|
48
|
-
"@types/tape": "^5.
|
|
48
|
+
"@types/tape": "^5.8.1",
|
|
49
49
|
"auto-changelog": "^2.5.0",
|
|
50
50
|
"eclint": "^2.8.1",
|
|
51
51
|
"encoding": "^0.1.13",
|
|
52
|
-
"eslint": "
|
|
52
|
+
"eslint": "^8.57.1",
|
|
53
53
|
"evalmd": "^0.0.19",
|
|
54
54
|
"in-publish": "^2.0.1",
|
|
55
|
-
"npmignore": "^0.3.
|
|
55
|
+
"npmignore": "^0.3.5",
|
|
56
56
|
"nyc": "^10.3.2",
|
|
57
57
|
"safe-publish-latest": "^2.0.0",
|
|
58
58
|
"tape": "^5.9.0",
|
|
@@ -100,5 +100,55 @@ test('getSideChannelList', function (t) {
|
|
|
100
100
|
st.end();
|
|
101
101
|
});
|
|
102
102
|
|
|
103
|
+
t.test('delete: first node in a multi-node list', function (st) {
|
|
104
|
+
var channel = getSideChannelList();
|
|
105
|
+
|
|
106
|
+
channel.set('a', 1);
|
|
107
|
+
channel.set('b', 2);
|
|
108
|
+
|
|
109
|
+
st.equal(channel['delete']('b'), true, 'deleting first data node yields true');
|
|
110
|
+
|
|
111
|
+
st.equal(channel.has('a'), true, 'second node is still present after deleting first');
|
|
112
|
+
st.equal(channel.get('a'), 1, 'second node value is intact after deleting first');
|
|
113
|
+
st.equal(channel.has('b'), false, 'deleted node is gone');
|
|
114
|
+
|
|
115
|
+
st.end();
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
t.test('delete: last remaining node empties the list', function (st) {
|
|
119
|
+
var channel = getSideChannelList();
|
|
120
|
+
|
|
121
|
+
channel.set('a', 1);
|
|
122
|
+
channel.set('b', 2);
|
|
123
|
+
|
|
124
|
+
st.equal(channel['delete']('b'), true, 'delete first node');
|
|
125
|
+
st.equal(channel['delete']('a'), true, 'delete second (last) node');
|
|
126
|
+
|
|
127
|
+
st.equal(channel.has('a'), false, 'a is gone');
|
|
128
|
+
st.equal(channel.has('b'), false, 'b is gone');
|
|
129
|
+
st.equal(channel.get('a'), undefined, 'get a yields undefined');
|
|
130
|
+
|
|
131
|
+
channel.set('c', 3);
|
|
132
|
+
st.equal(channel.get('c'), 3, 'can set new values after emptying');
|
|
133
|
+
|
|
134
|
+
st.end();
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
t.test('delete: middle node in a multi-node list', function (st) {
|
|
138
|
+
var channel = getSideChannelList();
|
|
139
|
+
|
|
140
|
+
channel.set('a', 1);
|
|
141
|
+
channel.set('b', 2);
|
|
142
|
+
channel.set('c', 3);
|
|
143
|
+
|
|
144
|
+
st.equal(channel['delete']('b'), true, 'deleting middle node yields true');
|
|
145
|
+
|
|
146
|
+
st.equal(channel.get('a'), 1, 'first node still intact');
|
|
147
|
+
st.equal(channel.has('b'), false, 'middle node is gone');
|
|
148
|
+
st.equal(channel.get('c'), 3, 'last node still intact');
|
|
149
|
+
|
|
150
|
+
st.end();
|
|
151
|
+
});
|
|
152
|
+
|
|
103
153
|
t.end();
|
|
104
154
|
});
|
|
@@ -27,6 +27,9 @@ export default function v35(version, hash, value, namespace, buf, offset) {
|
|
|
27
27
|
bytes[8] = (bytes[8] & 0x3f) | 0x80;
|
|
28
28
|
if (buf) {
|
|
29
29
|
offset = offset || 0;
|
|
30
|
+
if (offset < 0 || offset + 16 > buf.length) {
|
|
31
|
+
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
32
|
+
}
|
|
30
33
|
for (let i = 0; i < 16; ++i) {
|
|
31
34
|
buf[offset + i] = bytes[i];
|
|
32
35
|
}
|
|
@@ -7,6 +7,9 @@ function v6(options, buf, offset) {
|
|
|
7
7
|
let bytes = v1({ ...options, _v6: true }, new Uint8Array(16));
|
|
8
8
|
bytes = v1ToV6(bytes);
|
|
9
9
|
if (buf) {
|
|
10
|
+
if (offset < 0 || offset + 16 > buf.length) {
|
|
11
|
+
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
12
|
+
}
|
|
10
13
|
for (let i = 0; i < 16; i++) {
|
|
11
14
|
buf[offset + i] = bytes[i];
|
|
12
15
|
}
|
|
@@ -27,6 +27,9 @@ export default function v35(version, hash, value, namespace, buf, offset) {
|
|
|
27
27
|
bytes[8] = (bytes[8] & 0x3f) | 0x80;
|
|
28
28
|
if (buf) {
|
|
29
29
|
offset = offset || 0;
|
|
30
|
+
if (offset < 0 || offset + 16 > buf.length) {
|
|
31
|
+
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
32
|
+
}
|
|
30
33
|
for (let i = 0; i < 16; ++i) {
|
|
31
34
|
buf[offset + i] = bytes[i];
|
|
32
35
|
}
|
|
@@ -7,6 +7,9 @@ function v6(options, buf, offset) {
|
|
|
7
7
|
let bytes = v1({ ...options, _v6: true }, new Uint8Array(16));
|
|
8
8
|
bytes = v1ToV6(bytes);
|
|
9
9
|
if (buf) {
|
|
10
|
+
if (offset < 0 || offset + 16 > buf.length) {
|
|
11
|
+
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
12
|
+
}
|
|
10
13
|
for (let i = 0; i < 16; i++) {
|
|
11
14
|
buf[offset + i] = bytes[i];
|
|
12
15
|
}
|
package/node_modules/ws/index.js
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const createWebSocketStream = require('./lib/stream');
|
|
4
|
+
const extension = require('./lib/extension');
|
|
5
|
+
const PerMessageDeflate = require('./lib/permessage-deflate');
|
|
6
|
+
const Receiver = require('./lib/receiver');
|
|
7
|
+
const Sender = require('./lib/sender');
|
|
8
|
+
const subprotocol = require('./lib/subprotocol');
|
|
3
9
|
const WebSocket = require('./lib/websocket');
|
|
10
|
+
const WebSocketServer = require('./lib/websocket-server');
|
|
4
11
|
|
|
5
|
-
WebSocket.createWebSocketStream =
|
|
6
|
-
WebSocket.
|
|
7
|
-
WebSocket.
|
|
8
|
-
WebSocket.
|
|
9
|
-
|
|
12
|
+
WebSocket.createWebSocketStream = createWebSocketStream;
|
|
13
|
+
WebSocket.extension = extension;
|
|
14
|
+
WebSocket.PerMessageDeflate = PerMessageDeflate;
|
|
15
|
+
WebSocket.Receiver = Receiver;
|
|
16
|
+
WebSocket.Sender = Sender;
|
|
17
|
+
WebSocket.Server = WebSocketServer;
|
|
18
|
+
WebSocket.subprotocol = subprotocol;
|
|
10
19
|
WebSocket.WebSocket = WebSocket;
|
|
11
|
-
WebSocket.WebSocketServer =
|
|
20
|
+
WebSocket.WebSocketServer = WebSocketServer;
|
|
12
21
|
|
|
13
22
|
module.exports = WebSocket;
|