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
|
@@ -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/es-define-property
|
|
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
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/** @type {import('.')} */
|
|
4
|
+
var $defineProperty = Object.defineProperty || false;
|
|
5
|
+
if ($defineProperty) {
|
|
6
|
+
try {
|
|
7
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
8
|
+
} catch (e) {
|
|
9
|
+
// IE 8 has a broken defineProperty
|
|
10
|
+
$defineProperty = false;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
module.exports = $defineProperty;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "es-define-property",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "`Object.defineProperty`, but not IE 8's broken one.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.js",
|
|
9
|
+
"./package.json": "./package.json"
|
|
10
|
+
},
|
|
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": "tsc -p .",
|
|
19
|
+
"pretest": "npm run lint",
|
|
20
|
+
"tests-only": "nyc tape 'test/**/*.js'",
|
|
21
|
+
"test": "npm run tests-only",
|
|
22
|
+
"posttest": "npx npm@'>= 10.2' audit --production",
|
|
23
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
24
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/ljharb/es-define-property.git"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"javascript",
|
|
32
|
+
"ecmascript",
|
|
33
|
+
"object",
|
|
34
|
+
"define",
|
|
35
|
+
"property",
|
|
36
|
+
"defineProperty",
|
|
37
|
+
"Object.defineProperty"
|
|
38
|
+
],
|
|
39
|
+
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "https://github.com/ljharb/es-define-property/issues"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://github.com/ljharb/es-define-property#readme",
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@ljharb/eslint-config": "^21.1.1",
|
|
47
|
+
"@ljharb/tsconfig": "^0.2.2",
|
|
48
|
+
"@types/gopd": "^1.0.3",
|
|
49
|
+
"@types/tape": "^5.6.5",
|
|
50
|
+
"auto-changelog": "^2.5.0",
|
|
51
|
+
"encoding": "^0.1.13",
|
|
52
|
+
"eslint": "^8.8.0",
|
|
53
|
+
"evalmd": "^0.0.19",
|
|
54
|
+
"gopd": "^1.2.0",
|
|
55
|
+
"in-publish": "^2.0.1",
|
|
56
|
+
"npmignore": "^0.3.1",
|
|
57
|
+
"nyc": "^10.3.2",
|
|
58
|
+
"safe-publish-latest": "^2.0.0",
|
|
59
|
+
"tape": "^5.9.0",
|
|
60
|
+
"typescript": "next"
|
|
61
|
+
},
|
|
62
|
+
"engines": {
|
|
63
|
+
"node": ">= 0.4"
|
|
64
|
+
},
|
|
65
|
+
"testling": {
|
|
66
|
+
"files": "test/index.js"
|
|
67
|
+
},
|
|
68
|
+
"auto-changelog": {
|
|
69
|
+
"output": "CHANGELOG.md",
|
|
70
|
+
"template": "keepachangelog",
|
|
71
|
+
"unreleased": false,
|
|
72
|
+
"commitLimit": false,
|
|
73
|
+
"backfillLimit": false,
|
|
74
|
+
"hideCredit": true
|
|
75
|
+
},
|
|
76
|
+
"publishConfig": {
|
|
77
|
+
"ignore": [
|
|
78
|
+
".github/workflows"
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var $defineProperty = require('../');
|
|
4
|
+
|
|
5
|
+
var test = require('tape');
|
|
6
|
+
var gOPD = require('gopd');
|
|
7
|
+
|
|
8
|
+
test('defineProperty: supported', { skip: !$defineProperty }, function (t) {
|
|
9
|
+
t.plan(4);
|
|
10
|
+
|
|
11
|
+
t.equal(typeof $defineProperty, 'function', 'defineProperty is supported');
|
|
12
|
+
if ($defineProperty && gOPD) { // this `if` check is just to shut TS up
|
|
13
|
+
/** @type {{ a: number, b?: number, c?: number }} */
|
|
14
|
+
var o = { a: 1 };
|
|
15
|
+
|
|
16
|
+
$defineProperty(o, 'b', { enumerable: true, value: 2 });
|
|
17
|
+
t.deepEqual(
|
|
18
|
+
gOPD(o, 'b'),
|
|
19
|
+
{
|
|
20
|
+
configurable: false,
|
|
21
|
+
enumerable: true,
|
|
22
|
+
value: 2,
|
|
23
|
+
writable: false
|
|
24
|
+
},
|
|
25
|
+
'property descriptor is as expected'
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
$defineProperty(o, 'c', { enumerable: false, value: 3, writable: true });
|
|
29
|
+
t.deepEqual(
|
|
30
|
+
gOPD(o, 'c'),
|
|
31
|
+
{
|
|
32
|
+
configurable: false,
|
|
33
|
+
enumerable: false,
|
|
34
|
+
value: 3,
|
|
35
|
+
writable: true
|
|
36
|
+
},
|
|
37
|
+
'property descriptor is as expected'
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
t.equal($defineProperty, Object.defineProperty, 'defineProperty is Object.defineProperty');
|
|
42
|
+
|
|
43
|
+
t.end();
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test('defineProperty: not supported', { skip: !!$defineProperty }, function (t) {
|
|
47
|
+
t.notOk($defineProperty, 'defineProperty is not supported');
|
|
48
|
+
|
|
49
|
+
t.match(
|
|
50
|
+
typeof $defineProperty,
|
|
51
|
+
/^(?:undefined|boolean)$/,
|
|
52
|
+
'`typeof defineProperty` is `undefined` or `boolean`'
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
t.end();
|
|
56
|
+
});
|
|
@@ -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/es-object
|
|
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
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var $TypeError = require('es-errors/type');
|
|
4
|
+
|
|
5
|
+
/** @type {import('./RequireObjectCoercible')} */
|
|
6
|
+
module.exports = function RequireObjectCoercible(value) {
|
|
7
|
+
if (value == null) {
|
|
8
|
+
throw new $TypeError((arguments.length > 0 && arguments[1]) || ('Cannot call method on ' + value));
|
|
9
|
+
}
|
|
10
|
+
return value;
|
|
11
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare function ToObject<T extends object>(value: number): Number;
|
|
2
|
+
declare function ToObject<T extends object>(value: boolean): Boolean;
|
|
3
|
+
declare function ToObject<T extends object>(value: string): String;
|
|
4
|
+
declare function ToObject<T extends object>(value: bigint): BigInt;
|
|
5
|
+
declare function ToObject<T extends object>(value: T): T;
|
|
6
|
+
|
|
7
|
+
export = ToObject;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var $Object = require('./');
|
|
4
|
+
var RequireObjectCoercible = require('./RequireObjectCoercible');
|
|
5
|
+
|
|
6
|
+
/** @type {import('./ToObject')} */
|
|
7
|
+
module.exports = function ToObject(value) {
|
|
8
|
+
RequireObjectCoercible(value);
|
|
9
|
+
return $Object(value);
|
|
10
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "es-object-atoms",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "ES Object-related atoms: Object, ToObject, RequireObjectCoercible",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./index.js",
|
|
8
|
+
"./RequireObjectCoercible": "./RequireObjectCoercible.js",
|
|
9
|
+
"./isObject": "./isObject.js",
|
|
10
|
+
"./ToObject": "./ToObject.js",
|
|
11
|
+
"./package.json": "./package.json"
|
|
12
|
+
},
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"scripts": {
|
|
15
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
16
|
+
"prepublishOnly": "safe-publish-latest",
|
|
17
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
18
|
+
"pretest": "npm run lint",
|
|
19
|
+
"test": "npm run tests-only",
|
|
20
|
+
"tests-only": "nyc tape 'test/**/*.js'",
|
|
21
|
+
"posttest": "npx npm@\">= 10.2\" audit --production",
|
|
22
|
+
"prelint": "evalmd README.md",
|
|
23
|
+
"lint": "eslint --ext=js,mjs .",
|
|
24
|
+
"postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)",
|
|
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/ljharb/es-object-atoms.git"
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"javascript",
|
|
34
|
+
"ecmascript",
|
|
35
|
+
"object",
|
|
36
|
+
"toobject",
|
|
37
|
+
"coercible"
|
|
38
|
+
],
|
|
39
|
+
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "https://github.com/ljharb/es-object-atoms/issues"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://github.com/ljharb/es-object-atoms#readme",
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"es-errors": "^1.3.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@ljharb/eslint-config": "^21.1.1",
|
|
50
|
+
"@ljharb/tsconfig": "^0.2.3",
|
|
51
|
+
"@types/tape": "^5.8.1",
|
|
52
|
+
"auto-changelog": "^2.5.0",
|
|
53
|
+
"eclint": "^2.8.1",
|
|
54
|
+
"encoding": "^0.1.13",
|
|
55
|
+
"eslint": "^8.8.0",
|
|
56
|
+
"evalmd": "^0.0.19",
|
|
57
|
+
"in-publish": "^2.0.1",
|
|
58
|
+
"npmignore": "^0.3.1",
|
|
59
|
+
"nyc": "^10.3.2",
|
|
60
|
+
"safe-publish-latest": "^2.0.0",
|
|
61
|
+
"tape": "^5.9.0",
|
|
62
|
+
"typescript": "next"
|
|
63
|
+
},
|
|
64
|
+
"auto-changelog": {
|
|
65
|
+
"output": "CHANGELOG.md",
|
|
66
|
+
"template": "keepachangelog",
|
|
67
|
+
"unreleased": false,
|
|
68
|
+
"commitLimit": false,
|
|
69
|
+
"backfillLimit": false,
|
|
70
|
+
"hideCredit": true
|
|
71
|
+
},
|
|
72
|
+
"publishConfig": {
|
|
73
|
+
"ignore": [
|
|
74
|
+
".github/workflows"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"engines": {
|
|
78
|
+
"node": ">= 0.4"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('tape');
|
|
4
|
+
|
|
5
|
+
var $Object = require('../');
|
|
6
|
+
var isObject = require('../isObject');
|
|
7
|
+
var ToObject = require('../ToObject');
|
|
8
|
+
var RequireObjectCoercible = require('..//RequireObjectCoercible');
|
|
9
|
+
|
|
10
|
+
test('errors', function (t) {
|
|
11
|
+
t.equal($Object, Object);
|
|
12
|
+
// @ts-expect-error
|
|
13
|
+
t['throws'](function () { ToObject(null); }, TypeError);
|
|
14
|
+
// @ts-expect-error
|
|
15
|
+
t['throws'](function () { ToObject(undefined); }, TypeError);
|
|
16
|
+
// @ts-expect-error
|
|
17
|
+
t['throws'](function () { RequireObjectCoercible(null); }, TypeError);
|
|
18
|
+
// @ts-expect-error
|
|
19
|
+
t['throws'](function () { RequireObjectCoercible(undefined); }, TypeError);
|
|
20
|
+
|
|
21
|
+
t.deepEqual(RequireObjectCoercible(true), true);
|
|
22
|
+
t.deepEqual(ToObject(true), Object(true));
|
|
23
|
+
t.deepEqual(ToObject(42), Object(42));
|
|
24
|
+
var f = function () {};
|
|
25
|
+
t.equal(ToObject(f), f);
|
|
26
|
+
|
|
27
|
+
t.equal(isObject(undefined), false);
|
|
28
|
+
t.equal(isObject(null), false);
|
|
29
|
+
t.equal(isObject({}), true);
|
|
30
|
+
t.equal(isObject([]), true);
|
|
31
|
+
t.equal(isObject(function () {}), true);
|
|
32
|
+
|
|
33
|
+
var obj = {};
|
|
34
|
+
t.equal(RequireObjectCoercible(obj), obj);
|
|
35
|
+
t.equal(ToObject(obj), obj);
|
|
36
|
+
|
|
37
|
+
t.end();
|
|
38
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
4
|
+
|
|
5
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
6
|
+
|
|
7
|
+
var hasToStringTag = require('has-tostringtag/shams')();
|
|
8
|
+
var hasOwn = require('hasown');
|
|
9
|
+
var $TypeError = require('es-errors/type');
|
|
10
|
+
|
|
11
|
+
var toStringTag = hasToStringTag ? Symbol.toStringTag : null;
|
|
12
|
+
|
|
13
|
+
/** @type {import('.')} */
|
|
14
|
+
module.exports = function setToStringTag(object, value) {
|
|
15
|
+
var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force;
|
|
16
|
+
var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable;
|
|
17
|
+
if (
|
|
18
|
+
(typeof overrideIfSet !== 'undefined' && typeof overrideIfSet !== 'boolean')
|
|
19
|
+
|| (typeof nonConfigurable !== 'undefined' && typeof nonConfigurable !== 'boolean')
|
|
20
|
+
) {
|
|
21
|
+
throw new $TypeError('if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans');
|
|
22
|
+
}
|
|
23
|
+
if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) {
|
|
24
|
+
if ($defineProperty) {
|
|
25
|
+
$defineProperty(object, toStringTag, {
|
|
26
|
+
configurable: !nonConfigurable,
|
|
27
|
+
enumerable: false,
|
|
28
|
+
value: value,
|
|
29
|
+
writable: false
|
|
30
|
+
});
|
|
31
|
+
} else {
|
|
32
|
+
object[toStringTag] = value; // eslint-disable-line no-param-reassign
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
};
|
|
@@ -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/es-set-tostringtag/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
|
+
}
|