plugin-document-understanding 1.1.14 → 1.1.16
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/README.md +29 -29
- package/client-v2.d.ts +2 -2
- package/client-v2.js +1 -1
- package/dist/client/{345.e6e484fb1974c3d3.js → 345.277fbb2b97424db5.js} +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client-v2/{345.a8f28526ac21e02a.js → 345.2fa9834b46dd4531.js} +1 -1
- package/dist/client-v2/index.js +1 -1
- package/dist/externalVersion.js +8 -7
- package/dist/locale/en-US.json +3 -1
- package/dist/locale/zh-CN.json +3 -1
- package/dist/node_modules/form-data/lib/form_data.js +2 -2
- package/dist/node_modules/form-data/node_modules/es-define-property/.eslintrc +13 -0
- package/dist/node_modules/form-data/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/dist/node_modules/form-data/node_modules/es-define-property/.nycrc +9 -0
- package/dist/node_modules/form-data/node_modules/es-define-property/index.d.ts +3 -0
- package/dist/node_modules/form-data/node_modules/es-define-property/index.js +14 -0
- package/dist/node_modules/form-data/node_modules/es-define-property/package.json +81 -0
- package/dist/node_modules/form-data/node_modules/es-define-property/test/index.js +56 -0
- package/dist/node_modules/form-data/node_modules/es-object-atoms/.eslintrc +16 -0
- package/dist/node_modules/form-data/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/dist/node_modules/form-data/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/dist/node_modules/form-data/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/dist/node_modules/form-data/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/dist/node_modules/form-data/node_modules/es-object-atoms/ToObject.js +10 -0
- package/dist/node_modules/form-data/node_modules/es-object-atoms/index.d.ts +3 -0
- package/dist/node_modules/form-data/node_modules/es-object-atoms/index.js +4 -0
- package/dist/node_modules/form-data/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/dist/node_modules/form-data/node_modules/es-object-atoms/isObject.js +6 -0
- package/dist/node_modules/form-data/node_modules/es-object-atoms/package.json +80 -0
- package/dist/node_modules/form-data/node_modules/es-object-atoms/test/index.js +38 -0
- package/dist/node_modules/form-data/node_modules/es-set-tostringtag/.eslintrc +13 -0
- package/dist/node_modules/form-data/node_modules/es-set-tostringtag/.nycrc +9 -0
- package/dist/node_modules/form-data/node_modules/es-set-tostringtag/index.d.ts +10 -0
- package/dist/node_modules/form-data/node_modules/es-set-tostringtag/index.js +35 -0
- package/dist/node_modules/form-data/node_modules/es-set-tostringtag/node_modules/hasown/.eslintrc +5 -0
- package/dist/node_modules/form-data/node_modules/es-set-tostringtag/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/dist/node_modules/form-data/node_modules/es-set-tostringtag/node_modules/hasown/.nycrc +13 -0
- package/dist/node_modules/form-data/node_modules/es-set-tostringtag/node_modules/hasown/index.d.ts +3 -0
- package/dist/node_modules/form-data/node_modules/es-set-tostringtag/node_modules/hasown/index.js +8 -0
- package/dist/node_modules/form-data/node_modules/es-set-tostringtag/node_modules/hasown/package.json +92 -0
- package/dist/node_modules/form-data/node_modules/es-set-tostringtag/package.json +78 -0
- package/dist/node_modules/form-data/node_modules/es-set-tostringtag/test/index.js +85 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/.eslintrc +42 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/.nycrc +9 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/index.js +378 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/has-symbols/.eslintrc +11 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/has-symbols/.nycrc +9 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/has-symbols/index.d.ts +3 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/has-symbols/index.js +14 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/has-symbols/package.json +111 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/has-symbols/shams.d.ts +3 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/has-symbols/shams.js +45 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/has-symbols/test/index.js +22 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/has-symbols/test/tests.js +58 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/hasown/.eslintrc +5 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/hasown/.nycrc +13 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/hasown/index.d.ts +3 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/hasown/index.js +8 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/hasown/package.json +92 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/package.json +97 -0
- package/dist/node_modules/form-data/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/dist/node_modules/form-data/node_modules/gopd/.eslintrc +16 -0
- package/dist/node_modules/form-data/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/dist/node_modules/form-data/node_modules/gopd/gOPD.d.ts +1 -0
- package/dist/node_modules/form-data/node_modules/gopd/gOPD.js +4 -0
- package/dist/node_modules/form-data/node_modules/gopd/index.d.ts +5 -0
- package/dist/node_modules/form-data/node_modules/gopd/index.js +15 -0
- package/dist/node_modules/form-data/node_modules/gopd/package.json +77 -0
- package/dist/node_modules/form-data/node_modules/gopd/test/index.js +36 -0
- package/dist/node_modules/form-data/node_modules/has-tostringtag/.eslintrc +5 -0
- package/dist/node_modules/form-data/node_modules/has-tostringtag/.github/FUNDING.yml +12 -0
- package/dist/node_modules/form-data/node_modules/has-tostringtag/.nycrc +13 -0
- package/dist/node_modules/form-data/node_modules/has-tostringtag/index.d.ts +3 -0
- package/dist/node_modules/form-data/node_modules/has-tostringtag/index.js +8 -0
- package/dist/node_modules/form-data/node_modules/has-tostringtag/package.json +108 -0
- package/dist/node_modules/form-data/node_modules/has-tostringtag/shams.d.ts +3 -0
- package/dist/node_modules/form-data/node_modules/has-tostringtag/shams.js +8 -0
- package/dist/node_modules/form-data/node_modules/has-tostringtag/test/index.js +21 -0
- package/dist/node_modules/form-data/node_modules/has-tostringtag/test/shams/core-js.js +31 -0
- package/dist/node_modules/form-data/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +30 -0
- package/dist/node_modules/form-data/node_modules/has-tostringtag/test/tests.js +15 -0
- package/dist/node_modules/form-data/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/dist/node_modules/form-data/node_modules/hasown/.nycrc +13 -0
- package/dist/node_modules/form-data/node_modules/hasown/index.d.ts +3 -0
- package/dist/node_modules/form-data/node_modules/hasown/index.js +8 -0
- package/dist/node_modules/form-data/node_modules/hasown/package.json +91 -0
- package/dist/node_modules/form-data/package.json +1 -1
- package/dist/node_modules/mime-types/index.js +3 -3
- package/dist/node_modules/mime-types/package.json +1 -1
- package/dist/server/actions.js +45 -35
- package/package.json +57 -46
- package/src/client/index.tsx +15 -15
- package/src/client-v2/components/EndpointsTab.tsx +578 -578
- package/src/client-v2/components/JobsTab.tsx +294 -294
- package/src/client-v2/components/PipelinesTab.tsx +962 -962
- package/src/client-v2/components/PluginSettings.tsx +54 -50
- package/src/client-v2/components/ServiceConfigTab.tsx +139 -139
- package/src/client-v2/components/__tests__/PluginSettings.test.tsx +39 -0
- package/src/client-v2/index.tsx +1 -1
- package/src/client-v2/locale.ts +21 -21
- package/src/client-v2/models/index.ts +12 -12
- package/src/client-v2/plugin.tsx +31 -21
- package/src/client-v2/types.ts +32 -32
- package/src/index.ts +2 -2
- package/src/locale/en-US.json +3 -1
- package/src/locale/zh-CN.json +3 -1
- package/src/server/__tests__/actions.test.ts +121 -98
- package/src/server/__tests__/cluster-safety.test.ts +259 -259
- package/src/server/__tests__/document-understanding-service.test.ts +82 -82
- package/src/server/__tests__/dugate-integration.test.ts +221 -221
- package/src/server/__tests__/smoke.test.ts +78 -55
- package/src/server/__tests__/upload-security.test.ts +128 -0
- package/src/server/actions.ts +53 -51
- package/src/server/collections/config.ts +18 -18
- package/src/server/collections/endpoints.ts +33 -33
- package/src/server/collections/jobs.ts +42 -42
- package/src/server/collections/pipeline-steps.ts +27 -27
- package/src/server/collections/pipelines.ts +19 -19
- package/src/server/dugate-seed.ts +491 -491
- package/src/server/index.ts +1 -1
- package/src/server/plugin.ts +143 -143
- package/src/server/services/AsyncJobManager.ts +238 -238
- package/src/server/services/DocumentUnderstandingService.ts +332 -332
- package/src/server/services/ExternalApiClient.ts +178 -178
- package/src/server/services/PipelineExecutor.ts +593 -593
- package/src/server/tools/document-understanding-tool.ts +181 -181
- package/src/server/types.ts +90 -90
package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/has-symbols/package.json
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "has-symbols",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Determine if the JS environment has Symbol support. Supports spec, or shams.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
8
|
+
"prepublishOnly": "safe-publish-latest",
|
|
9
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
10
|
+
"pretest": "npm run --silent lint",
|
|
11
|
+
"test": "npm run tests-only",
|
|
12
|
+
"posttest": "npx npm@'>=10.2' audit --production",
|
|
13
|
+
"tests-only": "npm run test:stock && npm run test:shams",
|
|
14
|
+
"test:stock": "nyc node test",
|
|
15
|
+
"test:staging": "nyc node --harmony --es-staging test",
|
|
16
|
+
"test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs",
|
|
17
|
+
"test:shams:corejs": "nyc node test/shams/core-js.js",
|
|
18
|
+
"test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js",
|
|
19
|
+
"lint": "eslint --ext=js,mjs .",
|
|
20
|
+
"postlint": "tsc -p . && attw -P",
|
|
21
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
22
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git://github.com/inspect-js/has-symbols.git"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"Symbol",
|
|
30
|
+
"symbols",
|
|
31
|
+
"typeof",
|
|
32
|
+
"sham",
|
|
33
|
+
"polyfill",
|
|
34
|
+
"native",
|
|
35
|
+
"core-js",
|
|
36
|
+
"ES6"
|
|
37
|
+
],
|
|
38
|
+
"author": {
|
|
39
|
+
"name": "Jordan Harband",
|
|
40
|
+
"email": "ljharb@gmail.com",
|
|
41
|
+
"url": "http://ljharb.codes"
|
|
42
|
+
},
|
|
43
|
+
"contributors": [
|
|
44
|
+
{
|
|
45
|
+
"name": "Jordan Harband",
|
|
46
|
+
"email": "ljharb@gmail.com",
|
|
47
|
+
"url": "http://ljharb.codes"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"funding": {
|
|
51
|
+
"url": "https://github.com/sponsors/ljharb"
|
|
52
|
+
},
|
|
53
|
+
"license": "MIT",
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/ljharb/has-symbols/issues"
|
|
56
|
+
},
|
|
57
|
+
"homepage": "https://github.com/ljharb/has-symbols#readme",
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@arethetypeswrong/cli": "^0.17.0",
|
|
60
|
+
"@ljharb/eslint-config": "^21.1.1",
|
|
61
|
+
"@ljharb/tsconfig": "^0.2.0",
|
|
62
|
+
"@types/core-js": "^2.5.8",
|
|
63
|
+
"@types/tape": "^5.6.5",
|
|
64
|
+
"auto-changelog": "^2.5.0",
|
|
65
|
+
"core-js": "^2.6.12",
|
|
66
|
+
"encoding": "^0.1.13",
|
|
67
|
+
"eslint": "=8.8.0",
|
|
68
|
+
"get-own-property-symbols": "^0.9.5",
|
|
69
|
+
"in-publish": "^2.0.1",
|
|
70
|
+
"npmignore": "^0.3.1",
|
|
71
|
+
"nyc": "^10.3.2",
|
|
72
|
+
"safe-publish-latest": "^2.0.0",
|
|
73
|
+
"tape": "^5.9.0",
|
|
74
|
+
"typescript": "next"
|
|
75
|
+
},
|
|
76
|
+
"testling": {
|
|
77
|
+
"files": "test/index.js",
|
|
78
|
+
"browsers": [
|
|
79
|
+
"iexplore/6.0..latest",
|
|
80
|
+
"firefox/3.0..6.0",
|
|
81
|
+
"firefox/15.0..latest",
|
|
82
|
+
"firefox/nightly",
|
|
83
|
+
"chrome/4.0..10.0",
|
|
84
|
+
"chrome/20.0..latest",
|
|
85
|
+
"chrome/canary",
|
|
86
|
+
"opera/10.0..latest",
|
|
87
|
+
"opera/next",
|
|
88
|
+
"safari/4.0..latest",
|
|
89
|
+
"ipad/6.0..latest",
|
|
90
|
+
"iphone/6.0..latest",
|
|
91
|
+
"android-browser/4.2"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"engines": {
|
|
95
|
+
"node": ">= 0.4"
|
|
96
|
+
},
|
|
97
|
+
"auto-changelog": {
|
|
98
|
+
"output": "CHANGELOG.md",
|
|
99
|
+
"template": "keepachangelog",
|
|
100
|
+
"unreleased": false,
|
|
101
|
+
"commitLimit": false,
|
|
102
|
+
"backfillLimit": false,
|
|
103
|
+
"hideCredit": true
|
|
104
|
+
},
|
|
105
|
+
"publishConfig": {
|
|
106
|
+
"ignore": [
|
|
107
|
+
".github/workflows",
|
|
108
|
+
"types"
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
}
|
package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/has-symbols/shams.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/** @type {import('./shams')} */
|
|
4
|
+
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
5
|
+
module.exports = function hasSymbols() {
|
|
6
|
+
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
7
|
+
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
8
|
+
|
|
9
|
+
/** @type {{ [k in symbol]?: unknown }} */
|
|
10
|
+
var obj = {};
|
|
11
|
+
var sym = Symbol('test');
|
|
12
|
+
var symObj = Object(sym);
|
|
13
|
+
if (typeof sym === 'string') { return false; }
|
|
14
|
+
|
|
15
|
+
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
|
16
|
+
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
|
17
|
+
|
|
18
|
+
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
19
|
+
// if (sym instanceof Symbol) { return false; }
|
|
20
|
+
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
21
|
+
// if (!(symObj instanceof Symbol)) { return false; }
|
|
22
|
+
|
|
23
|
+
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
24
|
+
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
25
|
+
|
|
26
|
+
var symVal = 42;
|
|
27
|
+
obj[sym] = symVal;
|
|
28
|
+
for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
29
|
+
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
30
|
+
|
|
31
|
+
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
32
|
+
|
|
33
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
34
|
+
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
35
|
+
|
|
36
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
37
|
+
|
|
38
|
+
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
39
|
+
// eslint-disable-next-line no-extra-parens
|
|
40
|
+
var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));
|
|
41
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return true;
|
|
45
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('tape');
|
|
4
|
+
var hasSymbols = require('../');
|
|
5
|
+
var runSymbolTests = require('./tests');
|
|
6
|
+
|
|
7
|
+
test('interface', function (t) {
|
|
8
|
+
t.equal(typeof hasSymbols, 'function', 'is a function');
|
|
9
|
+
t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean');
|
|
10
|
+
t.end();
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
test('Symbols are supported', { skip: !hasSymbols() }, function (t) {
|
|
14
|
+
runSymbolTests(t);
|
|
15
|
+
t.end();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test('Symbols are not supported', { skip: hasSymbols() }, function (t) {
|
|
19
|
+
t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined');
|
|
20
|
+
t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist');
|
|
21
|
+
t.end();
|
|
22
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('tape');
|
|
4
|
+
|
|
5
|
+
if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') {
|
|
6
|
+
test('has native Symbol support', function (t) {
|
|
7
|
+
t.equal(typeof Symbol, 'function');
|
|
8
|
+
t.equal(typeof Symbol(), 'symbol');
|
|
9
|
+
t.end();
|
|
10
|
+
});
|
|
11
|
+
// @ts-expect-error TS is stupid and doesn't know about top level return
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
var hasSymbols = require('../../shams');
|
|
16
|
+
|
|
17
|
+
test('polyfilled Symbols', function (t) {
|
|
18
|
+
/* eslint-disable global-require */
|
|
19
|
+
t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling');
|
|
20
|
+
require('core-js/fn/symbol');
|
|
21
|
+
require('core-js/fn/symbol/to-string-tag');
|
|
22
|
+
|
|
23
|
+
require('../tests')(t);
|
|
24
|
+
|
|
25
|
+
var hasSymbolsAfter = hasSymbols();
|
|
26
|
+
t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling');
|
|
27
|
+
/* eslint-enable global-require */
|
|
28
|
+
t.end();
|
|
29
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('tape');
|
|
4
|
+
|
|
5
|
+
if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') {
|
|
6
|
+
test('has native Symbol support', function (t) {
|
|
7
|
+
t.equal(typeof Symbol, 'function');
|
|
8
|
+
t.equal(typeof Symbol(), 'symbol');
|
|
9
|
+
t.end();
|
|
10
|
+
});
|
|
11
|
+
// @ts-expect-error TS is stupid and doesn't know about top level return
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
var hasSymbols = require('../../shams');
|
|
16
|
+
|
|
17
|
+
test('polyfilled Symbols', function (t) {
|
|
18
|
+
/* eslint-disable global-require */
|
|
19
|
+
t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling');
|
|
20
|
+
|
|
21
|
+
require('get-own-property-symbols');
|
|
22
|
+
|
|
23
|
+
require('../tests')(t);
|
|
24
|
+
|
|
25
|
+
var hasSymbolsAfter = hasSymbols();
|
|
26
|
+
t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling');
|
|
27
|
+
/* eslint-enable global-require */
|
|
28
|
+
t.end();
|
|
29
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/** @type {(t: import('tape').Test) => false | void} */
|
|
4
|
+
// eslint-disable-next-line consistent-return
|
|
5
|
+
module.exports = function runSymbolTests(t) {
|
|
6
|
+
t.equal(typeof Symbol, 'function', 'global Symbol is a function');
|
|
7
|
+
|
|
8
|
+
if (typeof Symbol !== 'function') { return false; }
|
|
9
|
+
|
|
10
|
+
t.notEqual(Symbol(), Symbol(), 'two symbols are not equal');
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
t.equal(
|
|
14
|
+
Symbol.prototype.toString.call(Symbol('foo')),
|
|
15
|
+
Symbol.prototype.toString.call(Symbol('foo')),
|
|
16
|
+
'two symbols with the same description stringify the same'
|
|
17
|
+
);
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/*
|
|
21
|
+
var foo = Symbol('foo');
|
|
22
|
+
|
|
23
|
+
t.notEqual(
|
|
24
|
+
String(foo),
|
|
25
|
+
String(Symbol('bar')),
|
|
26
|
+
'two symbols with different descriptions do not stringify the same'
|
|
27
|
+
);
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function');
|
|
31
|
+
// t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol');
|
|
32
|
+
|
|
33
|
+
t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function');
|
|
34
|
+
|
|
35
|
+
/** @type {{ [k in symbol]?: unknown }} */
|
|
36
|
+
var obj = {};
|
|
37
|
+
var sym = Symbol('test');
|
|
38
|
+
var symObj = Object(sym);
|
|
39
|
+
t.notEqual(typeof sym, 'string', 'Symbol is not a string');
|
|
40
|
+
t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly');
|
|
41
|
+
t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly');
|
|
42
|
+
|
|
43
|
+
var symVal = 42;
|
|
44
|
+
obj[sym] = symVal;
|
|
45
|
+
// eslint-disable-next-line no-restricted-syntax, no-unused-vars
|
|
46
|
+
for (var _ in obj) { t.fail('symbol property key was found in for..in of object'); }
|
|
47
|
+
|
|
48
|
+
t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object');
|
|
49
|
+
t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object');
|
|
50
|
+
t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object');
|
|
51
|
+
t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable');
|
|
52
|
+
t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), {
|
|
53
|
+
configurable: true,
|
|
54
|
+
enumerable: true,
|
|
55
|
+
value: 42,
|
|
56
|
+
writable: true
|
|
57
|
+
}, 'property descriptor is correct');
|
|
58
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: [ljharb]
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: npm/hasown
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
custom: # Replace with a single custom sponsorship URL
|
package/dist/node_modules/form-data/node_modules/get-intrinsic/node_modules/hasown/package.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hasown",
|
|
3
|
+
"version": "2.0.2",
|
|
4
|
+
"description": "A robust, ES3 compatible, \"has own property\" predicate.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./index.js",
|
|
8
|
+
"./package.json": "./package.json"
|
|
9
|
+
},
|
|
10
|
+
"types": "index.d.ts",
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"scripts": {
|
|
13
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
14
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
15
|
+
"prepublishOnly": "safe-publish-latest",
|
|
16
|
+
"prelint": "evalmd README.md",
|
|
17
|
+
"lint": "eslint --ext=js,mjs .",
|
|
18
|
+
"postlint": "npm run tsc",
|
|
19
|
+
"pretest": "npm run lint",
|
|
20
|
+
"tsc": "tsc -p .",
|
|
21
|
+
"posttsc": "attw -P",
|
|
22
|
+
"tests-only": "nyc tape 'test/**/*.js'",
|
|
23
|
+
"test": "npm run tests-only",
|
|
24
|
+
"posttest": "aud --production",
|
|
25
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
26
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
27
|
+
},
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "git+https://github.com/inspect-js/hasOwn.git"
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"has",
|
|
34
|
+
"hasOwnProperty",
|
|
35
|
+
"hasOwn",
|
|
36
|
+
"has-own",
|
|
37
|
+
"own",
|
|
38
|
+
"has",
|
|
39
|
+
"property",
|
|
40
|
+
"in",
|
|
41
|
+
"javascript",
|
|
42
|
+
"ecmascript"
|
|
43
|
+
],
|
|
44
|
+
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
45
|
+
"license": "MIT",
|
|
46
|
+
"bugs": {
|
|
47
|
+
"url": "https://github.com/inspect-js/hasOwn/issues"
|
|
48
|
+
},
|
|
49
|
+
"homepage": "https://github.com/inspect-js/hasOwn#readme",
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"function-bind": "^1.1.2"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@arethetypeswrong/cli": "^0.15.1",
|
|
55
|
+
"@ljharb/eslint-config": "^21.1.0",
|
|
56
|
+
"@ljharb/tsconfig": "^0.2.0",
|
|
57
|
+
"@types/function-bind": "^1.1.10",
|
|
58
|
+
"@types/mock-property": "^1.0.2",
|
|
59
|
+
"@types/tape": "^5.6.4",
|
|
60
|
+
"aud": "^2.0.4",
|
|
61
|
+
"auto-changelog": "^2.4.0",
|
|
62
|
+
"eslint": "=8.8.0",
|
|
63
|
+
"evalmd": "^0.0.19",
|
|
64
|
+
"in-publish": "^2.0.1",
|
|
65
|
+
"mock-property": "^1.0.3",
|
|
66
|
+
"npmignore": "^0.3.1",
|
|
67
|
+
"nyc": "^10.3.2",
|
|
68
|
+
"safe-publish-latest": "^2.0.0",
|
|
69
|
+
"tape": "^5.7.5",
|
|
70
|
+
"typescript": "next"
|
|
71
|
+
},
|
|
72
|
+
"engines": {
|
|
73
|
+
"node": ">= 0.4"
|
|
74
|
+
},
|
|
75
|
+
"testling": {
|
|
76
|
+
"files": "test/index.js"
|
|
77
|
+
},
|
|
78
|
+
"auto-changelog": {
|
|
79
|
+
"output": "CHANGELOG.md",
|
|
80
|
+
"template": "keepachangelog",
|
|
81
|
+
"unreleased": false,
|
|
82
|
+
"commitLimit": false,
|
|
83
|
+
"backfillLimit": false,
|
|
84
|
+
"hideCredit": true
|
|
85
|
+
},
|
|
86
|
+
"publishConfig": {
|
|
87
|
+
"ignore": [
|
|
88
|
+
".github/workflows",
|
|
89
|
+
"test"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "get-intrinsic",
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"description": "Get and robustly cache all JS language-level intrinsics at first require time",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./index.js",
|
|
8
|
+
"./package.json": "./package.json"
|
|
9
|
+
},
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"scripts": {
|
|
12
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
13
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
14
|
+
"prepublishOnly": "safe-publish-latest",
|
|
15
|
+
"prelint": "evalmd README.md",
|
|
16
|
+
"lint": "eslint --ext=.js,.mjs .",
|
|
17
|
+
"pretest": "npm run lint",
|
|
18
|
+
"tests-only": "nyc tape 'test/**/*.js'",
|
|
19
|
+
"test": "npm run tests-only",
|
|
20
|
+
"posttest": "npx npm@'>= 10.2' audit --production",
|
|
21
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
22
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/ljharb/get-intrinsic.git"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [
|
|
29
|
+
"javascript",
|
|
30
|
+
"ecmascript",
|
|
31
|
+
"es",
|
|
32
|
+
"js",
|
|
33
|
+
"intrinsic",
|
|
34
|
+
"getintrinsic",
|
|
35
|
+
"es-abstract"
|
|
36
|
+
],
|
|
37
|
+
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
38
|
+
"funding": {
|
|
39
|
+
"url": "https://github.com/sponsors/ljharb"
|
|
40
|
+
},
|
|
41
|
+
"license": "MIT",
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/ljharb/get-intrinsic/issues"
|
|
44
|
+
},
|
|
45
|
+
"homepage": "https://github.com/ljharb/get-intrinsic#readme",
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"call-bind-apply-helpers": "^1.0.2",
|
|
48
|
+
"es-define-property": "^1.0.1",
|
|
49
|
+
"es-errors": "^1.3.0",
|
|
50
|
+
"es-object-atoms": "^1.1.1",
|
|
51
|
+
"function-bind": "^1.1.2",
|
|
52
|
+
"get-proto": "^1.0.1",
|
|
53
|
+
"gopd": "^1.2.0",
|
|
54
|
+
"has-symbols": "^1.1.0",
|
|
55
|
+
"hasown": "^2.0.2",
|
|
56
|
+
"math-intrinsics": "^1.1.0"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@ljharb/eslint-config": "^21.1.1",
|
|
60
|
+
"auto-changelog": "^2.5.0",
|
|
61
|
+
"call-bound": "^1.0.3",
|
|
62
|
+
"encoding": "^0.1.13",
|
|
63
|
+
"es-abstract": "^1.23.9",
|
|
64
|
+
"es-value-fixtures": "^1.7.1",
|
|
65
|
+
"eslint": "=8.8.0",
|
|
66
|
+
"evalmd": "^0.0.19",
|
|
67
|
+
"for-each": "^0.3.5",
|
|
68
|
+
"make-async-function": "^1.0.0",
|
|
69
|
+
"make-async-generator-function": "^1.0.0",
|
|
70
|
+
"make-generator-function": "^2.0.0",
|
|
71
|
+
"mock-property": "^1.1.0",
|
|
72
|
+
"npmignore": "^0.3.1",
|
|
73
|
+
"nyc": "^10.3.2",
|
|
74
|
+
"object-inspect": "^1.13.4",
|
|
75
|
+
"safe-publish-latest": "^2.0.0",
|
|
76
|
+
"tape": "^5.9.0"
|
|
77
|
+
},
|
|
78
|
+
"auto-changelog": {
|
|
79
|
+
"output": "CHANGELOG.md",
|
|
80
|
+
"template": "keepachangelog",
|
|
81
|
+
"unreleased": false,
|
|
82
|
+
"commitLimit": false,
|
|
83
|
+
"backfillLimit": false,
|
|
84
|
+
"hideCredit": true
|
|
85
|
+
},
|
|
86
|
+
"testling": {
|
|
87
|
+
"files": "test/GetIntrinsic.js"
|
|
88
|
+
},
|
|
89
|
+
"publishConfig": {
|
|
90
|
+
"ignore": [
|
|
91
|
+
".github/workflows"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"engines": {
|
|
95
|
+
"node": ">= 0.4"
|
|
96
|
+
}
|
|
97
|
+
}
|