@stacksjs/buddy 0.70.23 → 0.70.28
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 +15 -23
- package/dist/cli.js +3 -1
- package/dist/index.js +449 -1
- package/dist/src/cli.d.ts +1 -0
- package/dist/src/commands/about.d.ts +2 -0
- package/dist/src/commands/auth.d.ts +2 -0
- package/dist/src/commands/build.d.ts +2 -0
- package/dist/src/commands/changelog.d.ts +2 -0
- package/dist/src/commands/clean.d.ts +2 -0
- package/dist/src/commands/cloud.d.ts +2 -0
- package/dist/src/commands/commit.d.ts +2 -0
- package/dist/src/commands/completion.d.ts +2 -0
- package/dist/src/commands/config-migrate.d.ts +26 -0
- package/dist/src/commands/configure.d.ts +2 -0
- package/dist/src/commands/create.d.ts +2 -0
- package/dist/src/commands/deploy.d.ts +2 -0
- package/dist/{dev.d.ts → src/commands/dev.d.ts} +1 -3
- package/dist/src/commands/dns.d.ts +2 -0
- package/dist/src/commands/doctor.d.ts +2 -0
- package/dist/src/commands/domains.d.ts +2 -0
- package/dist/src/commands/email.d.ts +2 -0
- package/dist/src/commands/env.d.ts +2 -0
- package/dist/src/commands/fresh.d.ts +2 -0
- package/dist/src/commands/generate.d.ts +2 -0
- package/dist/src/commands/http.d.ts +2 -0
- package/dist/src/commands/index.d.ts +49 -0
- package/dist/src/commands/install.d.ts +2 -0
- package/dist/src/commands/key.d.ts +2 -0
- package/dist/src/commands/lint.d.ts +2 -0
- package/dist/src/commands/list.d.ts +2 -0
- package/dist/src/commands/mail.d.ts +2 -0
- package/dist/src/commands/make.d.ts +2 -0
- package/dist/src/commands/migrate.d.ts +2 -0
- package/dist/src/commands/outdated.d.ts +2 -0
- package/dist/src/commands/phone.d.ts +2 -0
- package/dist/src/commands/ports.d.ts +2 -0
- package/dist/src/commands/prepublish.d.ts +2 -0
- package/dist/src/commands/projects.d.ts +2 -0
- package/dist/src/commands/publish.d.ts +2 -0
- package/dist/src/commands/queue.d.ts +2 -0
- package/dist/src/commands/release.d.ts +2 -0
- package/dist/src/commands/route.d.ts +2 -0
- package/dist/src/commands/saas.d.ts +2 -0
- package/dist/src/commands/schedule.d.ts +2 -0
- package/dist/src/commands/search.d.ts +2 -0
- package/dist/src/commands/seed.d.ts +2 -0
- package/dist/src/commands/setup.d.ts +12 -0
- package/dist/src/commands/sms.d.ts +2 -0
- package/dist/src/commands/telemetry.d.ts +2 -0
- package/dist/src/commands/test.d.ts +2 -0
- package/dist/src/commands/tinker.d.ts +2 -0
- package/dist/src/commands/types.d.ts +2 -0
- package/dist/src/commands/upgrade.d.ts +2 -0
- package/dist/src/commands/version.d.ts +2 -0
- package/dist/src/index.d.ts +1 -0
- package/package.json +64 -61
- package/dist/add.d.ts +0 -4
- package/dist/build.d.ts +0 -4
- package/dist/changelog.d.ts +0 -3
- package/dist/chunk-1nq7pv3c.js +0 -7
- package/dist/chunk-29k4nndh.js +0 -2
- package/dist/chunk-39dwerh8.js +0 -5
- package/dist/chunk-3zqgxrhy.js +0 -2
- package/dist/chunk-496r9jw6.js +0 -3
- package/dist/chunk-4k60zpwd.js +0 -2
- package/dist/chunk-51tnc6dm.js +0 -2
- package/dist/chunk-5nbczt72.js +0 -2
- package/dist/chunk-6fsr2f40.js +0 -10
- package/dist/chunk-6v69415e.js +0 -2
- package/dist/chunk-7pg49t20.js +0 -2
- package/dist/chunk-8d01gfhw.js +0 -2
- package/dist/chunk-8kjkww7q.js +0 -8
- package/dist/chunk-97pfgxpz.js +0 -15
- package/dist/chunk-a47wfx2k.js +0 -2
- package/dist/chunk-cqrmkpzz.js +0 -8
- package/dist/chunk-ftse0wqn.js +0 -5410
- package/dist/chunk-jffk6kjy.js +0 -2
- package/dist/chunk-kg8bv5wt.js +0 -55
- package/dist/chunk-knytfag6.js +0 -33
- package/dist/chunk-ksjzw2hp.js +0 -2
- package/dist/chunk-mk0bde63.js +0 -2
- package/dist/chunk-qm8eqyn5.js +0 -2
- package/dist/chunk-rdgds02z.js +0 -3
- package/dist/chunk-sk9vc7y5.js +0 -1
- package/dist/chunk-sq3kqg71.js +0 -35
- package/dist/chunk-t2wb516a.js +0 -3
- package/dist/chunk-t4y0mz3y.js +0 -10
- package/dist/chunk-vgn2n3rk.js +0 -2
- package/dist/chunk-wzns1fp3.js +0 -1
- package/dist/chunk-xc6fz0pt.js +0 -2
- package/dist/chunk-xfhw9xck.js +0 -240
- package/dist/chunk-yzwe58rn.js +0 -25
- package/dist/clean.d.ts +0 -3
- package/dist/cli.d.ts +0 -4
- package/dist/cloud.d.ts +0 -3
- package/dist/commit.d.ts +0 -3
- package/dist/configure.d.ts +0 -4
- package/dist/create.d.ts +0 -8
- package/dist/custom-cli.d.ts +0 -1
- package/dist/deploy.d.ts +0 -7
- package/dist/dns.d.ts +0 -18
- package/dist/domains.d.ts +0 -3
- package/dist/env.d.ts +0 -20
- package/dist/fresh.d.ts +0 -3
- package/dist/generate.d.ts +0 -3
- package/dist/http.d.ts +0 -6
- package/dist/index.d.ts +0 -1
- package/dist/install.d.ts +0 -3
- package/dist/key.d.ts +0 -3
- package/dist/lint.d.ts +0 -3
- package/dist/list.d.ts +0 -3
- package/dist/make.d.ts +0 -1
- package/dist/migrate.d.ts +0 -3
- package/dist/outdated.d.ts +0 -3
- package/dist/ports.d.ts +0 -6
- package/dist/prepublish.d.ts +0 -3
- package/dist/projects.d.ts +0 -3
- package/dist/queue.d.ts +0 -3
- package/dist/release.d.ts +0 -9
- package/dist/route.d.ts +0 -3
- package/dist/saas.d.ts +0 -3
- package/dist/schedule.d.ts +0 -3
- package/dist/search.d.ts +0 -3
- package/dist/seed.d.ts +0 -3
- package/dist/setup.d.ts +0 -8
- package/dist/test.d.ts +0 -3
- package/dist/tinker.d.ts +0 -3
- package/dist/types.d.ts +0 -3
- package/dist/upgrade.d.ts +0 -4
- package/dist/version.d.ts +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { CLI } from '@stacksjs/types';
|
|
2
|
+
/*.ts` files.
|
|
3
|
+
* Honors `--dry-run` (prints diffs without writing) and `--only=<id>`
|
|
4
|
+
* (restrict to a single codemod).
|
|
5
|
+
*/
|
|
6
|
+
export declare function runConfigMigrations(opts: {
|
|
7
|
+
dryRun?: boolean
|
|
8
|
+
only?: string
|
|
9
|
+
}): Promise<{ changed: string[], skipped: string[] }>;
|
|
10
|
+
export declare function configMigrate(buddy: CLI): void;
|
|
11
|
+
/**
|
|
12
|
+
* A single config codemod — describes a search-and-replace operation
|
|
13
|
+
* against a user config file under `~/config/<file>.ts`. Each codemod
|
|
14
|
+
* is targeted at one specific Stacks-version transition (e.g. "0.65 →
|
|
15
|
+
* 0.66 renamed `cache.driver` to `cache.default`"). The replacement is
|
|
16
|
+
* a string transform — we deliberately avoid AST manipulation here
|
|
17
|
+
* because the input is user TS, comments matter, and we'd rather
|
|
18
|
+
* produce a textual diff than gamble on `ts-morph` reformatting code.
|
|
19
|
+
*/
|
|
20
|
+
export declare interface ConfigCodemod {
|
|
21
|
+
id: string
|
|
22
|
+
description: string
|
|
23
|
+
files: string[]
|
|
24
|
+
shouldApply(content: string): boolean
|
|
25
|
+
apply(content: string): string
|
|
26
|
+
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import type { CLI, DevOptions } from '@stacksjs/types';
|
|
2
|
-
|
|
3
2
|
export declare function dev(buddy: CLI): void;
|
|
4
|
-
export declare function startDevelopmentServer(options: DevOptions): Promise<void>;
|
|
5
|
-
declare function wantsInteractive(options: DevOptions): void;
|
|
3
|
+
export declare function startDevelopmentServer(options: DevOptions, startTime?: number): Promise<void>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export * from './about';
|
|
2
|
+
export * from './auth';
|
|
3
|
+
export * from './build';
|
|
4
|
+
export * from './changelog';
|
|
5
|
+
export * from './clean';
|
|
6
|
+
export * from './cloud';
|
|
7
|
+
export * from './commit';
|
|
8
|
+
export * from './completion';
|
|
9
|
+
export * from './config-migrate';
|
|
10
|
+
export * from './configure';
|
|
11
|
+
export * from './create';
|
|
12
|
+
export * from './deploy';
|
|
13
|
+
export * from './dev';
|
|
14
|
+
export * from './dns';
|
|
15
|
+
export * from './doctor';
|
|
16
|
+
export * from './domains';
|
|
17
|
+
export * from './email';
|
|
18
|
+
export * from './env';
|
|
19
|
+
export * from './fresh';
|
|
20
|
+
export * from './generate';
|
|
21
|
+
export * from './http';
|
|
22
|
+
export * from './install';
|
|
23
|
+
export * from './key';
|
|
24
|
+
export * from './lint';
|
|
25
|
+
export * from './list';
|
|
26
|
+
export * from './mail';
|
|
27
|
+
export * from './make';
|
|
28
|
+
export * from './migrate';
|
|
29
|
+
export * from './outdated';
|
|
30
|
+
export * from './phone';
|
|
31
|
+
export * from './ports';
|
|
32
|
+
export * from './prepublish';
|
|
33
|
+
export * from './projects';
|
|
34
|
+
export * from './publish';
|
|
35
|
+
export * from './queue';
|
|
36
|
+
export * from './release';
|
|
37
|
+
export * from './route';
|
|
38
|
+
export * from './saas';
|
|
39
|
+
export * from './schedule';
|
|
40
|
+
export * from './search';
|
|
41
|
+
export * from './seed';
|
|
42
|
+
export * from './setup';
|
|
43
|
+
export * from './sms';
|
|
44
|
+
export * from './telemetry';
|
|
45
|
+
export * from './test';
|
|
46
|
+
export * from './tinker';
|
|
47
|
+
export * from './types';
|
|
48
|
+
export * from './upgrade';
|
|
49
|
+
export * from './version';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CLI, CliOptions } from '@stacksjs/types';
|
|
2
|
+
export declare function setup(buddy: CLI): void;
|
|
3
|
+
export declare function ensurePantryInstalled(): Promise<void>;
|
|
4
|
+
export declare function ensurePantryDependencies(cwd: string): Promise<void>;
|
|
5
|
+
export declare function ensureAppKey(cwd: string): Promise<void>;
|
|
6
|
+
/**
|
|
7
|
+
* Reads config/deps.ts dependencies and merges in environment-detected
|
|
8
|
+
* dependencies (e.g. DB_CONNECTION), then writes deps.yaml so pantry install
|
|
9
|
+
* picks up the correct packages.
|
|
10
|
+
*/
|
|
11
|
+
export declare function optimizePantryDeps(): Promise<void>;
|
|
12
|
+
export declare function ensureEnvIsSet(options: CliOptions): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './commands';
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/buddy",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.70.
|
|
4
|
+
"version": "0.70.28",
|
|
5
5
|
"description": "Meet Buddy. The Stacks runtime.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
|
-
"contributors": [
|
|
7
|
+
"contributors": [
|
|
8
|
+
"Chris Breuer <chris@stacksjs.com>"
|
|
9
|
+
],
|
|
8
10
|
"license": "MIT",
|
|
9
11
|
"funding": "https://github.com/sponsors/chrisbbreuer",
|
|
10
12
|
"homepage": "https://github.com/stacksjs/stacks/tree/main/stacks#readme",
|
|
@@ -20,7 +22,6 @@
|
|
|
20
22
|
"stacks",
|
|
21
23
|
"buddy",
|
|
22
24
|
"runtime",
|
|
23
|
-
"vite",
|
|
24
25
|
"component",
|
|
25
26
|
"composables",
|
|
26
27
|
"functions",
|
|
@@ -38,10 +39,13 @@
|
|
|
38
39
|
],
|
|
39
40
|
"exports": {
|
|
40
41
|
".": {
|
|
42
|
+
"types": "./dist/index.d.ts",
|
|
43
|
+
"bun": "./src/index.ts",
|
|
41
44
|
"import": "./dist/index.js"
|
|
42
45
|
},
|
|
43
46
|
"./cli": {
|
|
44
47
|
"types": "./dist/cli.d.ts",
|
|
48
|
+
"bun": "./src/cli.ts",
|
|
45
49
|
"import": "./dist/cli.js"
|
|
46
50
|
},
|
|
47
51
|
"./*": {
|
|
@@ -56,17 +60,20 @@
|
|
|
56
60
|
"buddy": "dist/cli.js",
|
|
57
61
|
"bud": "dist/cli.js"
|
|
58
62
|
},
|
|
59
|
-
"files": [
|
|
63
|
+
"files": [
|
|
64
|
+
"README.md",
|
|
65
|
+
"dist"
|
|
66
|
+
],
|
|
60
67
|
"scripts": {
|
|
61
68
|
"buddy": "bunx --bun ./src/cli.ts",
|
|
62
69
|
"build": "bun build.ts",
|
|
63
|
-
"compile": "bun build ./
|
|
70
|
+
"compile": "bun build ./src/cli.ts --compile --minify --sourcemap --external=localtunnels/cloud --external=bun-queue --outfile dist/buddy",
|
|
64
71
|
"compile:all": "bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:windows-x64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64",
|
|
65
|
-
"compile:linux-x64": "bun build ./
|
|
66
|
-
"compile:linux-arm64": "bun build ./
|
|
67
|
-
"compile:windows-x64": "bun build ./
|
|
68
|
-
"compile:darwin-x64": "bun build ./
|
|
69
|
-
"compile:darwin-arm64": "bun build ./
|
|
72
|
+
"compile:linux-x64": "bun build ./src/cli.ts --compile --minify --target=bun-linux-x64 --external=localtunnels/cloud --external=bun-queue --outfile bin/buddy-linux-x64",
|
|
73
|
+
"compile:linux-arm64": "bun build ./src/cli.ts --compile --minify --target=bun-linux-arm64 --external=localtunnels/cloud --external=bun-queue --outfile bin/buddy-linux-arm64",
|
|
74
|
+
"compile:windows-x64": "bun build ./src/cli.ts --compile --minify --target=bun-windows-x64 --external=localtunnels/cloud --external=bun-queue --outfile bin/buddy-windows-x64.exe",
|
|
75
|
+
"compile:darwin-x64": "bun build ./src/cli.ts --compile --minify --target=bun-darwin-x64 --external=localtunnels/cloud --external=bun-queue --outfile bin/buddy-darwin-x64",
|
|
76
|
+
"compile:darwin-arm64": "bun build ./src/cli.ts --compile --minify --target=bun-darwin-arm64 --external=localtunnels/cloud --external=bun-queue --outfile bin/buddy-darwin-arm64",
|
|
70
77
|
"typecheck": "bun tsc --noEmit",
|
|
71
78
|
"zip:all": "bun run zip:linux-x64 && bun run zip:linux-arm64 && bun run zip:windows-x64 && bun run zip:darwin-x64 && bun run zip:darwin-arm64",
|
|
72
79
|
"zip:linux-x64": "zip -r bin/buddy-linux-x64.zip bin/buddy-linux-x64",
|
|
@@ -74,60 +81,56 @@
|
|
|
74
81
|
"zip:windows-x64": "zip -r bin/buddy-windows-x64.zip bin/buddy-windows-x64.exe",
|
|
75
82
|
"zip:darwin-x64": "zip -r bin/buddy-darwin-x64.zip bin/buddy-darwin-x64",
|
|
76
83
|
"zip:darwin-arm64": "zip -r bin/buddy-darwin-arm64.zip bin/buddy-darwin-arm64",
|
|
77
|
-
"prepublishOnly": "bun run build
|
|
84
|
+
"prepublishOnly": "bun run build"
|
|
78
85
|
},
|
|
79
86
|
"dependencies": {
|
|
80
|
-
"@stacksjs/actions": "0.70.
|
|
81
|
-
"@stacksjs/ai": "0.70.
|
|
82
|
-
"@stacksjs/alias": "0.70.
|
|
83
|
-
"@stacksjs/arrays": "0.70.
|
|
84
|
-
"@stacksjs/auth": "0.70.
|
|
85
|
-
"@stacksjs/build": "0.70.
|
|
86
|
-
"@stacksjs/cache": "0.70.
|
|
87
|
-
"@stacksjs/cli": "0.70.
|
|
88
|
-
"@stacksjs/cloud": "0.70.
|
|
89
|
-
"@stacksjs/collections": "0.70.
|
|
90
|
-
"@stacksjs/config": "0.70.
|
|
91
|
-
"@stacksjs/database": "0.70.
|
|
92
|
-
"@stacksjs/desktop": "0.70.
|
|
93
|
-
"@stacksjs/
|
|
94
|
-
"@stacksjs/
|
|
95
|
-
"@stacksjs/
|
|
96
|
-
"@stacksjs/
|
|
97
|
-
"@stacksjs/
|
|
98
|
-
"@stacksjs/
|
|
99
|
-
"@stacksjs/
|
|
100
|
-
"@stacksjs/
|
|
101
|
-
"@stacksjs/
|
|
102
|
-
"@stacksjs/
|
|
103
|
-
"@stacksjs/
|
|
104
|
-
"@stacksjs/
|
|
105
|
-
"@stacksjs/
|
|
106
|
-
"@stacksjs/
|
|
107
|
-
"@stacksjs/
|
|
108
|
-
"@stacksjs/
|
|
109
|
-
"@stacksjs/
|
|
110
|
-
"@stacksjs/
|
|
111
|
-
"@stacksjs/
|
|
112
|
-
"@stacksjs/search-engine": "0.70.
|
|
113
|
-
"@stacksjs/security": "0.70.
|
|
114
|
-
"@stacksjs/server": "0.70.
|
|
115
|
-
"@stacksjs/storage": "0.70.
|
|
116
|
-
"@stacksjs/strings": "0.70.
|
|
117
|
-
"@stacksjs/testing": "0.70.
|
|
118
|
-
"@stacksjs/tunnel": "0.70.
|
|
119
|
-
"@stacksjs/types": "0.70.
|
|
120
|
-
"@stacksjs/ui": "0.70.
|
|
121
|
-
"@stacksjs/utils": "0.70.
|
|
122
|
-
"@stacksjs/validation": "0.70.
|
|
87
|
+
"@stacksjs/actions": "^0.70.23",
|
|
88
|
+
"@stacksjs/ai": "^0.70.23",
|
|
89
|
+
"@stacksjs/alias": "^0.70.23",
|
|
90
|
+
"@stacksjs/arrays": "^0.70.23",
|
|
91
|
+
"@stacksjs/auth": "^0.70.23",
|
|
92
|
+
"@stacksjs/build": "^0.70.23",
|
|
93
|
+
"@stacksjs/cache": "^0.70.23",
|
|
94
|
+
"@stacksjs/cli": "^0.70.23",
|
|
95
|
+
"@stacksjs/cloud": "^0.70.23",
|
|
96
|
+
"@stacksjs/collections": "^0.70.23",
|
|
97
|
+
"@stacksjs/config": "^0.70.23",
|
|
98
|
+
"@stacksjs/database": "^0.70.23",
|
|
99
|
+
"@stacksjs/desktop": "^0.70.23",
|
|
100
|
+
"@stacksjs/dns": "^0.70.23",
|
|
101
|
+
"@stacksjs/email": "^0.70.23",
|
|
102
|
+
"@stacksjs/enums": "^0.70.23",
|
|
103
|
+
"@stacksjs/error-handling": "^0.70.23",
|
|
104
|
+
"@stacksjs/events": "^0.70.23",
|
|
105
|
+
"@stacksjs/git": "^0.70.23",
|
|
106
|
+
"@stacksjs/health": "^0.70.23",
|
|
107
|
+
"@stacksjs/dnsx": "^0.2.3",
|
|
108
|
+
"@stacksjs/httx": "^0.1.10",
|
|
109
|
+
"@stacksjs/lint": "^0.70.23",
|
|
110
|
+
"@stacksjs/logging": "^0.70.23",
|
|
111
|
+
"@stacksjs/notifications": "^0.70.23",
|
|
112
|
+
"@stacksjs/objects": "^0.70.23",
|
|
113
|
+
"@stacksjs/orm": "^0.70.23",
|
|
114
|
+
"@stacksjs/path": "^0.70.23",
|
|
115
|
+
"@stacksjs/payments": "^0.70.23",
|
|
116
|
+
"@stacksjs/realtime": "^0.70.23",
|
|
117
|
+
"@stacksjs/router": "^0.70.23",
|
|
118
|
+
"@stacksjs/rpx": "^0.11.2",
|
|
119
|
+
"@stacksjs/search-engine": "^0.70.23",
|
|
120
|
+
"@stacksjs/security": "^0.70.23",
|
|
121
|
+
"@stacksjs/server": "^0.70.23",
|
|
122
|
+
"@stacksjs/storage": "^0.70.23",
|
|
123
|
+
"@stacksjs/strings": "^0.70.23",
|
|
124
|
+
"@stacksjs/testing": "^0.70.23",
|
|
125
|
+
"@stacksjs/tunnel": "^0.70.23",
|
|
126
|
+
"@stacksjs/types": "^0.70.23",
|
|
127
|
+
"@stacksjs/ui": "^0.70.23",
|
|
128
|
+
"@stacksjs/utils": "^0.70.23",
|
|
129
|
+
"@stacksjs/validation": "^0.70.23",
|
|
130
|
+
"@stacksjs/ts-cloud": "^0.2.15"
|
|
123
131
|
},
|
|
124
132
|
"devDependencies": {
|
|
125
|
-
"
|
|
126
|
-
},
|
|
127
|
-
"config": {
|
|
128
|
-
"commitizen": {
|
|
129
|
-
"path": "node_modules/cz-git"
|
|
130
|
-
}
|
|
133
|
+
"better-dx": "^0.2.12"
|
|
131
134
|
},
|
|
132
135
|
"web-types": "./web-types.json"
|
|
133
|
-
}
|
|
136
|
+
}
|
package/dist/add.d.ts
DELETED
package/dist/build.d.ts
DELETED
package/dist/changelog.d.ts
DELETED
package/dist/chunk-1nq7pv3c.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Jb as E,Vb as T,ic as q,jc as A,kc as L,mc as y,pc as b,qc as h}from"./chunk-39dwerh8.js";import{Fc as X}from"./chunk-6fsr2f40.js";import"./chunk-xc6fz0pt.js";import{Tc as Y}from"./chunk-8kjkww7q.js";import{Uc as l}from"./chunk-3zqgxrhy.js";import{Vc as u}from"./chunk-ksjzw2hp.js";var K=u(Y(),1);var g=u(l(),1);import Z from"node:fs/promises";var x=u(l(),1);var z="169.254.170.2",D="169.254.170.23",W="[fd00:ec2::23]",S=(e,n)=>{if(e.protocol==="https:")return;if(e.hostname===z||e.hostname===D||e.hostname===W)return;if(e.hostname.includes("[")){if(e.hostname==="[::1]"||e.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(e.hostname==="localhost")return;let o=e.hostname.split("."),r=(t)=>{let s=parseInt(t,10);return 0<=s&&s<=255};if(o[0]==="127"&&r(o[1])&&r(o[2])&&r(o[3])&&o.length===4)return}throw new x.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
3
|
-
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
4
|
-
- ECS container host 169.254.170.2
|
|
5
|
-
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:n})};var m=u(l(),1);var a=(e)=>typeof ReadableStream==="function"&&(e?.constructor?.name===ReadableStream.name||e instanceof ReadableStream);import{Readable as w}from"node:stream";var C=async(e)=>{if(typeof Blob==="function"&&e instanceof Blob||e.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==void 0)return new Uint8Array(await e.arrayBuffer());return J(e)}return Q(e)};async function J(e){let n=await V(e),o=y(n);return new Uint8Array(o)}async function Q(e){let n=[],o=e.getReader(),r=!1,t=0;while(!r){let{done:c,value:f}=await o.read();if(f)n.push(f),t+=f.length;r=c}let s=new Uint8Array(t),i=0;for(let c of n)s.set(c,i),i+=c.length;return s}function V(e){return new Promise((n,o)=>{let r=new FileReader;r.onloadend=()=>{if(r.readyState!==2)return o(new Error("Reader aborted too early"));let t=r.result??"",s=t.indexOf(","),i=s>-1?s+1:t.length;n(t.substring(i))},r.onabort=()=>o(new Error("Read aborted")),r.onerror=()=>o(r.error),r.readAsDataURL(e)})}var k=u(X(),1);var v="The stream has already been transformed.",$=(e)=>{if(!B(e)&&!a(e)){let t=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${t}`)}let n=!1,o=async()=>{if(n)throw new Error(v);return n=!0,await C(e)},r=(t)=>{if(typeof t.stream!=="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
|
|
6
|
-
If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return t.stream()};return Object.assign(e,{transformToByteArray:o,transformToString:async(t)=>{let s=await o();if(t==="base64")return h(s);else if(t==="hex")return k.toHex(s);else if(t===void 0||t==="utf8"||t==="utf-8")return b(s);else if(typeof TextDecoder==="function")return new TextDecoder(t).decode(s);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(n)throw new Error(v);if(n=!0,B(e))return r(e);else if(a(e))return e;else throw new Error(`Cannot transform payload to web stream, got ${e}`)}})},B=(e)=>typeof Blob==="function"&&e instanceof Blob;var P="The stream has already been transformed.",R=(e)=>{if(!(e instanceof w))try{return $(e)}catch(r){let t=e?.__proto__?.constructor?.name||e;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${t}`)}let n=!1,o=async()=>{if(n)throw new Error(P);return n=!0,await A(e)};return Object.assign(e,{transformToByteArray:o,transformToString:async(r)=>{let t=await o();if(r===void 0||Buffer.isEncoding(r))return L(t.buffer,t.byteOffset,t.byteLength).toString(r);else return new TextDecoder(r).decode(t)},transformToWebStream:()=>{if(n)throw new Error(P);if(e.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof w.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return n=!0,w.toWeb(e)}})};function U(e){return new E({protocol:e.protocol,hostname:e.hostname,port:Number(e.port),path:e.pathname,query:Array.from(e.searchParams.entries()).reduce((n,[o,r])=>{return n[o]=r,n},{}),fragment:e.hash})}async function I(e,n){let r=await R(e.body).transformToString();if(e.statusCode===200){let t=JSON.parse(r);if(typeof t.AccessKeyId!=="string"||typeof t.SecretAccessKey!=="string"||typeof t.Token!=="string"||typeof t.Expiration!=="string")throw new m.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:n});return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.Token,expiration:T(t.Expiration)}}if(e.statusCode>=400&&e.statusCode<500){let t={};try{t=JSON.parse(r)}catch(s){}throw Object.assign(new m.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:n}),{Code:t.Code,Message:t.Message})}throw new m.CredentialsProviderError(`Server responded with status: ${e.statusCode}`,{logger:n})}var O=(e,n,o)=>{return async()=>{for(let r=0;r<n;++r)try{return await e()}catch(t){await new Promise((s)=>setTimeout(s,o))}return await e()}};var G="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",N="http://169.254.170.2",F="AWS_CONTAINER_CREDENTIALS_FULL_URI",M="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",_="AWS_CONTAINER_AUTHORIZATION_TOKEN",ee=(e={})=>{e.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let n,o=e.awsContainerCredentialsRelativeUri??process.env[G],r=e.awsContainerCredentialsFullUri??process.env[F],t=e.awsContainerAuthorizationToken??process.env[_],s=e.awsContainerAuthorizationTokenFile??process.env[M],i=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console.warn:e.logger.warn;if(o&&r)i("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),i("awsContainerCredentialsFullUri will take precedence.");if(t&&s)i("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),i("awsContainerAuthorizationToken will take precedence.");if(r)n=r;else if(o)n=`${N}${o}`;else throw new g.CredentialsProviderError(`No HTTP credential provider host provided.
|
|
7
|
-
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:e.logger});let c=new URL(n);S(c,e.logger);let f=new q({requestTimeout:e.timeout??1000,connectionTimeout:e.timeout??1000});return O(async()=>{let d=U(c);if(t)d.headers.Authorization=t;else if(s)d.headers.Authorization=(await Z.readFile(s)).toString();try{let p=await f.handle(d);return I(p.response).then((H)=>K.setCredentialFeature(H,"CREDENTIALS_HTTP","z"))}catch(p){throw new g.CredentialsProviderError(String(p),{logger:e.logger})}},e.maxRetries??3,e.timeout??1000)};export{ee as fromHttp};
|
package/dist/chunk-29k4nndh.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Xc as a}from"./chunk-ksjzw2hp.js";var s=a((j1,j$)=>{var U$={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:"(?=.)",QMARK:"[^/]",END_ANCHOR:"(?:\\/|$)",DOTS_SLASH:"\\.{1,2}(?:\\/|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|\\/)\\.{1,2}(?:\\/|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:\\/|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:\\/|$))",QMARK_NO_DOT:"[^.\\/]",STAR:"[^/]*?",START_ANCHOR:"(?:^|\\/)",SEP:"/"},h$={...U$,SLASH_LITERAL:"[\\\\/]",QMARK:"[^\\\\/]",STAR:"[^\\\\/]*?",DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},A$={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};j$.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:A$,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars($){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${$.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars($){return $===!0?h$:U$}}});var e=a((c$)=>{var{REGEX_BACKSLASH:d$,REGEX_REMOVE_BACKSLASH:k$,REGEX_SPECIAL_CHARS:b$,REGEX_SPECIAL_CHARS_GLOBAL:v$}=s();c$.isObject=($)=>$!==null&&typeof $==="object"&&!Array.isArray($);c$.hasRegexChars=($)=>b$.test($);c$.isRegexChar=($)=>$.length===1&&c$.hasRegexChars($);c$.escapeRegex=($)=>$.replace(v$,"\\$1");c$.toPosixSlashes=($)=>$.replace(d$,"/");c$.isWindows=()=>{if(typeof navigator!=="undefined"&&navigator.platform){let $=navigator.platform.toLowerCase();return $==="win32"||$==="windows"}if(typeof process!=="undefined"&&process.platform)return process.platform==="win32";return!1};c$.removeBackslashes=($)=>{return $.replace(k$,(Y)=>{return Y==="\\"?"":Y})};c$.escapeLast=($,Y,z)=>{let j=$.lastIndexOf(Y,z);if(j===-1)return $;if($[j-1]==="\\")return c$.escapeLast($,Y,j-1);return`${$.slice(0,j)}\\${$.slice(j)}`};c$.removePrefix=($,Y={})=>{let z=$;if(z.startsWith("./"))z=z.slice(2),Y.prefix="./";return z};c$.wrapOutput=($,Y={},z={})=>{let j=z.contains?"":"^",W=z.contains?"":"$",P=`${j}(?:${$})${W}`;if(Y.negated===!0)P=`(?:^(?!${P}).*$)`;return P};c$.basename=($,{windows:Y}={})=>{let z=$.split(Y?/[\\/]/:"/"),j=z[z.length-1];if(j==="")return z[z.length-2];return j}});var C$=a((B1,I$)=>{var K$=e(),{CHAR_ASTERISK:V$,CHAR_AT:e$,CHAR_BACKWARD_SLASH:t,CHAR_COMMA:t$,CHAR_DOT:Y$,CHAR_EXCLAMATION_MARK:W$,CHAR_FORWARD_SLASH:N$,CHAR_LEFT_CURLY_BRACE:y$,CHAR_LEFT_PARENTHESES:F$,CHAR_LEFT_SQUARE_BRACKET:$1,CHAR_PLUS:z1,CHAR_QUESTION_MARK:G$,CHAR_RIGHT_CURLY_BRACE:J1,CHAR_RIGHT_PARENTHESES:f$,CHAR_RIGHT_SQUARE_BRACKET:Z1}=s(),M$=($)=>{return $===N$||$===t},D$=($)=>{if($.isPrefix!==!0)$.depth=$.isGlobstar?1/0:1},q1=($,Y)=>{let z=Y||{},j=$.length-1,W=z.parts===!0||z.scanToEnd===!0,P=[],F=[],B=[],M=$,E=-1,K=0,S=0,x=!1,A=!1,G=!1,T=!1,r=!1,v=!1,D=!1,c=!1,n=!1,R=!1,g=0,d,y,X={value:"",depth:0,isGlob:!1},q=()=>E>=j,h=()=>M.charCodeAt(E+1),L=()=>{return d=y,M.charCodeAt(++E)};while(E<j){y=L();let f;if(y===t){if(D=X.backslashes=!0,y=L(),y===y$)v=!0;continue}if(v===!0||y===y$){g++;while(q()!==!0&&(y=L())){if(y===t){D=X.backslashes=!0,L();continue}if(y===y$){g++;continue}if(v!==!0&&y===Y$&&(y=L())===Y$){if(x=X.isBrace=!0,G=X.isGlob=!0,R=!0,W===!0)continue;break}if(v!==!0&&y===t$){if(x=X.isBrace=!0,G=X.isGlob=!0,R=!0,W===!0)continue;break}if(y===J1){if(g--,g===0){v=!1,x=X.isBrace=!0,R=!0;break}}}if(W===!0)continue;break}if(y===N$){if(P.push(E),F.push(X),X={value:"",depth:0,isGlob:!1},R===!0)continue;if(d===Y$&&E===K+1){K+=2;continue}S=E+1;continue}if(z.noext!==!0){if((y===z1||y===e$||y===V$||y===G$||y===W$)===!0&&h()===F$){if(G=X.isGlob=!0,T=X.isExtglob=!0,R=!0,y===W$&&E===K)n=!0;if(W===!0){while(q()!==!0&&(y=L())){if(y===t){D=X.backslashes=!0,y=L();continue}if(y===f$){G=X.isGlob=!0,R=!0;break}}continue}break}}if(y===V$){if(d===V$)r=X.isGlobstar=!0;if(G=X.isGlob=!0,R=!0,W===!0)continue;break}if(y===G$){if(G=X.isGlob=!0,R=!0,W===!0)continue;break}if(y===$1){while(q()!==!0&&(f=L())){if(f===t){D=X.backslashes=!0,L();continue}if(f===Z1){A=X.isBracket=!0,G=X.isGlob=!0,R=!0;break}}if(W===!0)continue;break}if(z.nonegate!==!0&&y===W$&&E===K){c=X.negated=!0,K++;continue}if(z.noparen!==!0&&y===F$){if(G=X.isGlob=!0,W===!0){while(q()!==!0&&(y=L())){if(y===F$){D=X.backslashes=!0,y=L();continue}if(y===f$){R=!0;break}}continue}break}if(G===!0){if(R=!0,W===!0)continue;break}}if(z.noext===!0)T=!1,G=!1;let O=M,J="",Z="";if(K>0)J=M.slice(0,K),M=M.slice(K),S-=K;if(O&&G===!0&&S>0)O=M.slice(0,S),Z=M.slice(S);else if(G===!0)O="",Z=M;else O=M;if(O&&O!==""&&O!=="/"&&O!==M){if(M$(O.charCodeAt(O.length-1)))O=O.slice(0,-1)}if(z.unescape===!0){if(Z)Z=K$.removeBackslashes(Z);if(O&&D===!0)O=K$.removeBackslashes(O)}let k={prefix:J,input:$,start:K,base:O,glob:Z,isBrace:x,isBracket:A,isGlob:G,isExtglob:T,isGlobstar:r,negated:c,negatedExtglob:n};if(z.tokens===!0){if(k.maxDepth=0,!M$(y))F.push(X);k.tokens=F}if(z.parts===!0||z.tokens===!0){let f;for(let I=0;I<P.length;I++){let i=f?f+1:K,b=P[I],u=$.slice(i,b);if(z.tokens){if(I===0&&K!==0)F[I].isPrefix=!0,F[I].value=J;else F[I].value=u;D$(F[I]),k.maxDepth+=F[I].depth}if(I!==0||u!=="")B.push(u);f=b}if(f&&f+1<$.length){let I=$.slice(f+1);if(B.push(I),z.tokens)F[F.length-1].value=I,D$(F[F.length-1]),k.maxDepth+=F[F.length-1].depth}k.slashes=P,k.parts=B}return k};I$.exports=q1});var x$=a((K1,H$)=>{var Z$=s(),l=e(),{MAX_LENGTH:q$,POSIX_REGEX_SOURCE:w1,REGEX_NON_SPECIAL_CHARS:V1,REGEX_SPECIAL_CHARS_BACKREF:Y1,REPLACEMENTS:O$}=Z$,W1=($,Y)=>{if(typeof Y.expandRange==="function")return Y.expandRange(...$,Y);$.sort();let z=`[${$.join("-")}]`;try{new RegExp(z)}catch(j){return $.map((W)=>l.escapeRegex(W)).join("..")}return z},o=($,Y)=>{return`Missing ${$}: "${Y}" - use "\\\\${Y}" to match literal characters`},Q$=($,Y)=>{if(typeof $!=="string")throw new TypeError("Expected a string");$=O$[$]||$;let z={...Y},j=typeof z.maxLength==="number"?Math.min(q$,z.maxLength):q$,W=$.length;if(W>j)throw new SyntaxError(`Input length: ${W}, exceeds maximum allowed length: ${j}`);let P={type:"bos",value:"",output:z.prepend||""},F=[P],B=z.capture?"":"?:",M=Z$.globChars(z.windows),E=Z$.extglobChars(M),{DOT_LITERAL:K,PLUS_LITERAL:S,SLASH_LITERAL:x,ONE_CHAR:A,DOTS_SLASH:G,NO_DOT:T,NO_DOT_SLASH:r,NO_DOTS_SLASH:v,QMARK:D,QMARK_NO_DOT:c,STAR:n,START_ANCHOR:R}=M,g=(V)=>{return`(${B}(?:(?!${R}${V.dot?G:K}).)*?)`},d=z.dot?"":T,y=z.dot?D:c,X=z.bash===!0?g(z):n;if(z.capture)X=`(${X})`;if(typeof z.noext==="boolean")z.noextglob=z.noext;let q={input:$,index:-1,start:0,dot:z.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:F};$=l.removePrefix($,q),W=$.length;let h=[],L=[],O=[],J=P,Z,k=()=>q.index===W-1,f=q.peek=(V=1)=>$[q.index+V],I=q.advance=()=>$[++q.index]||"",i=()=>$.slice(q.index+1),b=(V="",N=0)=>{q.consumed+=V,q.index+=N},u=(V)=>{q.output+=V.output!=null?V.output:V.value,b(V.value)},R$=()=>{let V=1;while(f()==="!"&&(f(2)!=="("||f(3)==="?"))I(),q.start++,V++;if(V%2===0)return!1;return q.negated=!0,q.start++,!0},$$=(V)=>{q[V]++,O.push(V)},p=(V)=>{q[V]--,O.pop()},U=(V)=>{if(J.type==="globstar"){let N=q.braces>0&&(V.type==="comma"||V.type==="brace"),w=V.extglob===!0||h.length&&(V.type==="pipe"||V.type==="paren");if(V.type!=="slash"&&V.type!=="paren"&&!N&&!w)q.output=q.output.slice(0,-J.output.length),J.type="star",J.value="*",J.output=X,q.output+=J.output}if(h.length&&V.type!=="paren")h[h.length-1].inner+=V.value;if(V.value||V.output)u(V);if(J&&J.type==="text"&&V.type==="text"){J.output=(J.output||J.value)+V.value,J.value+=V.value;return}V.prev=J,F.push(V),J=V},z$=(V,N)=>{let w={...E[N],conditions:1,inner:""};w.prev=J,w.parens=q.parens,w.output=q.output;let Q=(z.capture?"(":"")+w.open;$$("parens"),U({type:V,value:N,output:q.output?"":A}),U({type:"paren",extglob:!0,value:I(),output:Q}),h.push(w)},_$=(V)=>{let N=V.close+(z.capture?")":""),w;if(V.type==="negate"){let Q=X;if(V.inner&&V.inner.length>1&&V.inner.includes("/"))Q=g(z);if(Q!==X||k()||/^\)+$/.test(i()))N=V.close=`)$))${Q}`;if(V.inner.includes("*")&&(w=i())&&/^\.[^\\/.]+$/.test(w)){let C=Q$(w,{...Y,fastpaths:!1}).output;N=V.close=`)${C})${Q})`}if(V.prev.type==="bos")q.negatedExtglob=!0}U({type:"paren",extglob:!0,value:Z,output:N}),p("parens")};if(z.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test($)){let V=!1,N=$.replace(Y1,(w,Q,C,_,m,w$)=>{if(_==="\\")return V=!0,w;if(_==="?"){if(Q)return Q+_+(m?D.repeat(m.length):"");if(w$===0)return y+(m?D.repeat(m.length):"");return D.repeat(C.length)}if(_===".")return K.repeat(C.length);if(_==="*"){if(Q)return Q+_+(m?X:"");return X}return Q?w:`\\${w}`});if(V===!0)if(z.unescape===!0)N=N.replace(/\\/g,"");else N=N.replace(/\\+/g,(w)=>{return w.length%2===0?"\\\\":w?"\\":""});if(N===$&&z.contains===!0)return q.output=$,q;return q.output=l.wrapOutput(N,q,Y),q}while(!k()){if(Z=I(),Z==="\x00")continue;if(Z==="\\"){let w=f();if(w==="/"&&z.bash!==!0)continue;if(w==="."||w===";")continue;if(!w){Z+="\\",U({type:"text",value:Z});continue}let Q=/^\\+/.exec(i()),C=0;if(Q&&Q[0].length>2){if(C=Q[0].length,q.index+=C,C%2!==0)Z+="\\"}if(z.unescape===!0)Z=I();else Z+=I();if(q.brackets===0){U({type:"text",value:Z});continue}}if(q.brackets>0&&(Z!=="]"||J.value==="["||J.value==="[^")){if(z.posix!==!1&&Z===":"){let w=J.value.slice(1);if(w.includes("[")){if(J.posix=!0,w.includes(":")){let Q=J.value.lastIndexOf("["),C=J.value.slice(0,Q),_=J.value.slice(Q+2),m=w1[_];if(m){if(J.value=C+m,q.backtrack=!0,I(),!P.output&&F.indexOf(J)===1)P.output=A;continue}}}}if(Z==="["&&f()!==":"||Z==="-"&&f()==="]")Z=`\\${Z}`;if(Z==="]"&&(J.value==="["||J.value==="[^"))Z=`\\${Z}`;if(z.posix===!0&&Z==="!"&&J.value==="[")Z="^";J.value+=Z,u({value:Z});continue}if(q.quotes===1&&Z!=='"'){Z=l.escapeRegex(Z),J.value+=Z,u({value:Z});continue}if(Z==='"'){if(q.quotes=q.quotes===1?0:1,z.keepQuotes===!0)U({type:"text",value:Z});continue}if(Z==="("){$$("parens"),U({type:"paren",value:Z});continue}if(Z===")"){if(q.parens===0&&z.strictBrackets===!0)throw new SyntaxError(o("opening","("));let w=h[h.length-1];if(w&&q.parens===w.parens+1){_$(h.pop());continue}U({type:"paren",value:Z,output:q.parens?")":"\\)"}),p("parens");continue}if(Z==="["){if(z.nobracket===!0||!i().includes("]")){if(z.nobracket!==!0&&z.strictBrackets===!0)throw new SyntaxError(o("closing","]"));Z=`\\${Z}`}else $$("brackets");U({type:"bracket",value:Z});continue}if(Z==="]"){if(z.nobracket===!0||J&&J.type==="bracket"&&J.value.length===1){U({type:"text",value:Z,output:`\\${Z}`});continue}if(q.brackets===0){if(z.strictBrackets===!0)throw new SyntaxError(o("opening","["));U({type:"text",value:Z,output:`\\${Z}`});continue}p("brackets");let w=J.value.slice(1);if(J.posix!==!0&&w[0]==="^"&&!w.includes("/"))Z=`/${Z}`;if(J.value+=Z,u({value:Z}),z.literalBrackets===!1||l.hasRegexChars(w))continue;let Q=l.escapeRegex(J.value);if(q.output=q.output.slice(0,-J.value.length),z.literalBrackets===!0){q.output+=Q,J.value=Q;continue}J.value=`(${B}${Q}|${J.value})`,q.output+=J.value;continue}if(Z==="{"&&z.nobrace!==!0){$$("braces");let w={type:"brace",value:Z,output:"(",outputIndex:q.output.length,tokensIndex:q.tokens.length};L.push(w),U(w);continue}if(Z==="}"){let w=L[L.length-1];if(z.nobrace===!0||!w){U({type:"text",value:Z,output:Z});continue}let Q=")";if(w.dots===!0){let C=F.slice(),_=[];for(let m=C.length-1;m>=0;m--){if(F.pop(),C[m].type==="brace")break;if(C[m].type!=="dots")_.unshift(C[m].value)}Q=W1(_,z),q.backtrack=!0}if(w.comma!==!0&&w.dots!==!0){let C=q.output.slice(0,w.outputIndex),_=q.tokens.slice(w.tokensIndex);w.value=w.output="\\{",Z=Q="\\}",q.output=C;for(let m of _)q.output+=m.output||m.value}U({type:"brace",value:Z,output:Q}),p("braces"),L.pop();continue}if(Z==="|"){if(h.length>0)h[h.length-1].conditions++;U({type:"text",value:Z});continue}if(Z===","){let w=Z,Q=L[L.length-1];if(Q&&O[O.length-1]==="braces")Q.comma=!0,w="|";U({type:"comma",value:Z,output:w});continue}if(Z==="/"){if(J.type==="dot"&&q.index===q.start+1){q.start=q.index+1,q.consumed="",q.output="",F.pop(),J=P;continue}U({type:"slash",value:Z,output:x});continue}if(Z==="."){if(q.braces>0&&J.type==="dot"){if(J.value===".")J.output=K;let w=L[L.length-1];J.type="dots",J.output+=Z,J.value+=Z,w.dots=!0;continue}if(q.braces+q.parens===0&&J.type!=="bos"&&J.type!=="slash"){U({type:"text",value:Z,output:K});continue}U({type:"dot",value:Z,output:K});continue}if(Z==="?"){if(!(J&&J.value==="(")&&z.noextglob!==!0&&f()==="("&&f(2)!=="?"){z$("qmark",Z);continue}if(J&&J.type==="paren"){let Q=f(),C=Z;if(J.value==="("&&!/[!=<:]/.test(Q)||Q==="<"&&!/<([!=]|\w+>)/.test(i()))C=`\\${Z}`;U({type:"text",value:Z,output:C});continue}if(z.dot!==!0&&(J.type==="slash"||J.type==="bos")){U({type:"qmark",value:Z,output:c});continue}U({type:"qmark",value:Z,output:D});continue}if(Z==="!"){if(z.noextglob!==!0&&f()==="("){if(f(2)!=="?"||!/[!=<:]/.test(f(3))){z$("negate",Z);continue}}if(z.nonegate!==!0&&q.index===0){R$();continue}}if(Z==="+"){if(z.noextglob!==!0&&f()==="("&&f(2)!=="?"){z$("plus",Z);continue}if(J&&J.value==="("||z.regex===!1){U({type:"plus",value:Z,output:S});continue}if(J&&(J.type==="bracket"||J.type==="paren"||J.type==="brace")||q.parens>0){U({type:"plus",value:Z});continue}U({type:"plus",value:S});continue}if(Z==="@"){if(z.noextglob!==!0&&f()==="("&&f(2)!=="?"){U({type:"at",extglob:!0,value:Z,output:""});continue}U({type:"text",value:Z});continue}if(Z!=="*"){if(Z==="$"||Z==="^")Z=`\\${Z}`;let w=V1.exec(i());if(w)Z+=w[0],q.index+=w[0].length;U({type:"text",value:Z});continue}if(J&&(J.type==="globstar"||J.star===!0)){J.type="star",J.star=!0,J.value+=Z,J.output=X,q.backtrack=!0,q.globstar=!0,b(Z);continue}let V=i();if(z.noextglob!==!0&&/^\([^?]/.test(V)){z$("star",Z);continue}if(J.type==="star"){if(z.noglobstar===!0){b(Z);continue}let w=J.prev,Q=w.prev,C=w.type==="slash"||w.type==="bos",_=Q&&(Q.type==="star"||Q.type==="globstar");if(z.bash===!0&&(!C||V[0]&&V[0]!=="/")){U({type:"star",value:Z,output:""});continue}let m=q.braces>0&&(w.type==="comma"||w.type==="brace"),w$=h.length&&(w.type==="pipe"||w.type==="paren");if(!C&&w.type!=="paren"&&!m&&!w$){U({type:"star",value:Z,output:""});continue}while(V.slice(0,3)==="/**"){let J$=$[q.index+4];if(J$&&J$!=="/")break;V=V.slice(3),b("/**",3)}if(w.type==="bos"&&k()){J.type="globstar",J.value+=Z,J.output=g(z),q.output=J.output,q.globstar=!0,b(Z);continue}if(w.type==="slash"&&w.prev.type!=="bos"&&!_&&k()){q.output=q.output.slice(0,-(w.output+J.output).length),w.output=`(?:${w.output}`,J.type="globstar",J.output=g(z)+(z.strictSlashes?")":"|$)"),J.value+=Z,q.globstar=!0,q.output+=w.output+J.output,b(Z);continue}if(w.type==="slash"&&w.prev.type!=="bos"&&V[0]==="/"){let J$=V[1]!==void 0?"|$":"";q.output=q.output.slice(0,-(w.output+J.output).length),w.output=`(?:${w.output}`,J.type="globstar",J.output=`${g(z)}${x}|${x}${J$})`,J.value+=Z,q.output+=w.output+J.output,q.globstar=!0,b(Z+I()),U({type:"slash",value:"/",output:""});continue}if(w.type==="bos"&&V[0]==="/"){J.type="globstar",J.value+=Z,J.output=`(?:^|${x}|${g(z)}${x})`,q.output=J.output,q.globstar=!0,b(Z+I()),U({type:"slash",value:"/",output:""});continue}q.output=q.output.slice(0,-J.output.length),J.type="globstar",J.output=g(z),J.value+=Z,q.output+=J.output,q.globstar=!0,b(Z);continue}let N={type:"star",value:Z,output:X};if(z.bash===!0){if(N.output=".*?",J.type==="bos"||J.type==="slash")N.output=d+N.output;U(N);continue}if(J&&(J.type==="bracket"||J.type==="paren")&&z.regex===!0){N.output=Z,U(N);continue}if(q.index===q.start||J.type==="slash"||J.type==="dot"){if(J.type==="dot")q.output+=r,J.output+=r;else if(z.dot===!0)q.output+=v,J.output+=v;else q.output+=d,J.output+=d;if(f()!=="*")q.output+=A,J.output+=A}U(N)}while(q.brackets>0){if(z.strictBrackets===!0)throw new SyntaxError(o("closing","]"));q.output=l.escapeLast(q.output,"["),p("brackets")}while(q.parens>0){if(z.strictBrackets===!0)throw new SyntaxError(o("closing",")"));q.output=l.escapeLast(q.output,"("),p("parens")}while(q.braces>0){if(z.strictBrackets===!0)throw new SyntaxError(o("closing","}"));q.output=l.escapeLast(q.output,"{"),p("braces")}if(z.strictSlashes!==!0&&(J.type==="star"||J.type==="bracket"))U({type:"maybe_slash",value:"",output:`${x}?`});if(q.backtrack===!0){q.output="";for(let V of q.tokens)if(q.output+=V.output!=null?V.output:V.value,V.suffix)q.output+=V.suffix}return q};Q$.fastpaths=($,Y)=>{let z={...Y},j=typeof z.maxLength==="number"?Math.min(q$,z.maxLength):q$,W=$.length;if(W>j)throw new SyntaxError(`Input length: ${W}, exceeds maximum allowed length: ${j}`);$=O$[$]||$;let{DOT_LITERAL:P,SLASH_LITERAL:F,ONE_CHAR:B,DOTS_SLASH:M,NO_DOT:E,NO_DOTS:K,NO_DOTS_SLASH:S,STAR:x,START_ANCHOR:A}=Z$.globChars(z.windows),G=z.dot?K:E,T=z.dot?S:E,r=z.capture?"":"?:",v={negated:!1,prefix:""},D=z.bash===!0?".*?":x;if(z.capture)D=`(${D})`;let c=(d)=>{if(d.noglobstar===!0)return D;return`(${r}(?:(?!${A}${d.dot?M:P}).)*?)`},n=(d)=>{switch(d){case"*":return`${G}${B}${D}`;case".*":return`${P}${B}${D}`;case"*.*":return`${G}${D}${P}${B}${D}`;case"*/*":return`${G}${D}${F}${B}${T}${D}`;case"**":return G+c(z);case"**/*":return`(?:${G}${c(z)}${F})?${T}${B}${D}`;case"**/*.*":return`(?:${G}${c(z)}${F})?${T}${D}${P}${B}${D}`;case"**/.*":return`(?:${G}${c(z)}${F})?${P}${B}${D}`;default:{let y=/^(.*?)\.(\w+)$/.exec(d);if(!y)return;let X=n(y[1]);if(!X)return;return X+P+y[2]}}},R=l.removePrefix($,v),g=n(R);if(g&&z.strictSlashes!==!0)g+=`${F}?`;return g};H$.exports=Q$});var T$=a((G1,m$)=>{var y1=C$(),X$=x$(),L$=e(),F1=s(),Q1=($)=>$&&typeof $==="object"&&!Array.isArray($),H=($,Y,z=!1)=>{if(Array.isArray($)){let K=$.map((x)=>H(x,Y,z));return(x)=>{for(let A of K){let G=A(x);if(G)return G}return!1}}let j=Q1($)&&$.tokens&&$.input;if($===""||typeof $!=="string"&&!j)throw new TypeError("Expected pattern to be a non-empty string");let W=Y||{},P=W.windows,F=j?H.compileRe($,Y):H.makeRe($,Y,!1,!0),B=F.state;delete F.state;let M=()=>!1;if(W.ignore){let K={...Y,ignore:null,onMatch:null,onResult:null};M=H(W.ignore,K,z)}let E=(K,S=!1)=>{let{isMatch:x,match:A,output:G}=H.test(K,F,Y,{glob:$,posix:P}),T={glob:$,state:B,regex:F,posix:P,input:K,output:G,match:A,isMatch:x};if(typeof W.onResult==="function")W.onResult(T);if(x===!1)return T.isMatch=!1,S?T:!1;if(M(K)){if(typeof W.onIgnore==="function")W.onIgnore(T);return T.isMatch=!1,S?T:!1}if(typeof W.onMatch==="function")W.onMatch(T);return S?T:!0};if(z)E.state=B;return E};H.test=($,Y,z,{glob:j,posix:W}={})=>{if(typeof $!=="string")throw new TypeError("Expected input to be a string");if($==="")return{isMatch:!1,output:""};let P=z||{},F=P.format||(W?L$.toPosixSlashes:null),B=$===j,M=B&&F?F($):$;if(B===!1)M=F?F($):$,B=M===j;if(B===!1||P.capture===!0)if(P.matchBase===!0||P.basename===!0)B=H.matchBase($,Y,z,W);else B=Y.exec(M);return{isMatch:Boolean(B),match:B,output:M}};H.matchBase=($,Y,z)=>{return(Y instanceof RegExp?Y:H.makeRe(Y,z)).test(L$.basename($))};H.isMatch=($,Y,z)=>H(Y,z)($);H.parse=($,Y)=>{if(Array.isArray($))return $.map((z)=>H.parse(z,Y));return X$($,{...Y,fastpaths:!1})};H.scan=($,Y)=>y1($,Y);H.compileRe=($,Y,z=!1,j=!1)=>{if(z===!0)return $.output;let W=Y||{},P=W.contains?"":"^",F=W.contains?"":"$",B=`${P}(?:${$.output})${F}`;if($&&$.negated===!0)B=`^(?!${B}).*$`;let M=H.toRegex(B,Y);if(j===!0)M.state=$;return M};H.makeRe=($,Y={},z=!1,j=!1)=>{if(!$||typeof $!=="string")throw new TypeError("Expected a non-empty string");let W={negated:!1,fastpaths:!0};if(Y.fastpaths!==!1&&($[0]==="."||$[0]==="*"))W.output=X$.fastpaths($,Y);if(!W.output)W=X$($,Y);return H.compileRe(W,Y,z,j)};H.toRegex=($,Y)=>{try{let z=Y||{};return new RegExp($,z.flags||(z.nocase?"i":""))}catch(z){if(Y&&Y.debug===!0)throw z;return/$^/}};H.constants=F1;m$.exports=H});var U1=a((f1,S$)=>{var E$=T$(),X1=e();function g$($,Y,z=!1){if(Y&&(Y.windows===null||Y.windows===void 0))Y={...Y,windows:X1.isWindows()};return E$($,Y,z)}Object.assign(g$,E$);S$.exports=g$});
|
|
2
|
-
export{U1 as Ca};
|