vibedgames 0.8.1 → 0.9.0
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 +14 -6
- package/dist/THIRD_PARTY_NOTICES.txt +58 -6
- package/dist/{chunk-FNYBZNW2.js → chunk-25BAMW5X.js} +3 -1
- package/dist/{chunk-GCX5KQ6A.js → chunk-2VUUMXAQ.js} +2 -2
- package/dist/{chunk-7MKUR7Y3.js → chunk-355VG7EO.js} +13 -12
- package/dist/{chunk-I6O4HIDY.js → chunk-3HUWAJQH.js} +76 -61
- package/dist/{chunk-2QBYTIMH.js → chunk-5535KDYI.js} +1 -1
- package/dist/chunk-56OY4TEP.js +20125 -0
- package/dist/{chunk-PHEDW6C7.js → chunk-6EWHKL7Z.js} +13 -5
- package/dist/{chunk-6FZPPUQH.js → chunk-7CXMMC5S.js} +1 -1
- package/dist/{chunk-QJZ72MSY.js → chunk-7QZSDU52.js} +5 -5
- package/dist/{chunk-MGIASPED.js → chunk-AXTLPJ2F.js} +5 -5
- package/dist/{chunk-RAUJA3OY.js → chunk-BMTHAVMS.js} +5 -5
- package/dist/{chunk-CU7UY5YJ.js → chunk-D2RF35HJ.js} +1 -1
- package/dist/chunk-FC233UKH.js +170 -0
- package/dist/{chunk-CAKBGDCY.js → chunk-GKDUYJ7R.js} +5 -0
- package/dist/{chunk-HCMTSR7E.js → chunk-H3IPLBXQ.js} +8 -7
- package/dist/{chunk-QGEITHUP.js → chunk-HNRVSBRK.js} +5 -5
- package/dist/chunk-K2U7L4RU.js +183 -0
- package/dist/{chunk-PQDBCZRT.js → chunk-KZBZNTM4.js} +203 -153
- package/dist/{chunk-QIVCBUYD.js → chunk-LXS3NJYD.js} +7 -6
- package/dist/{chunk-HKA5LBYW.js → chunk-LY2GQ32S.js} +9 -8
- package/dist/{chunk-2GL2WJZX.js → chunk-NDHXM4PL.js} +4 -4
- package/dist/{chunk-PM5UOIKR.js → chunk-OD2MNYXD.js} +16 -16
- package/dist/{chunk-JT2AU24K.js → chunk-QARXJGI5.js} +1 -1
- package/dist/{chunk-RYFO3ZPO.js → chunk-RXHTGX7C.js} +9 -2
- package/dist/chunk-ST5FC2W3.js +95 -0
- package/dist/{chunk-AYJQVZXY.js → chunk-TBQ5BU3Q.js} +4 -4
- package/dist/{chunk-N3XAUFKH.js → chunk-UFR6G6BL.js} +38 -63
- package/dist/{chunk-4BGCA3W7.js → chunk-US6QZICZ.js} +8 -8
- package/dist/{chunk-TLRL6FHW.js → chunk-UXCWSWWX.js} +7 -7
- package/dist/chunk-UZM6OSW5.js +113 -0
- package/dist/{chunk-NC5XCGYU.js → chunk-WSRIF6K4.js} +4 -4
- package/dist/chunk-X75Y7LUW.js +126 -0
- package/dist/chunk-Z5TFZQ5U.js +2478 -0
- package/dist/{chunk-C2IRIRAA.js → chunk-ZCYWDKYP.js} +2 -2
- package/dist/index.js +30 -19
- package/package.json +6 -5
- package/dist/chunk-MJQSHP3Y.js +0 -415
- package/dist/chunk-MYFLYNPO.js +0 -68
package/README.md
CHANGED
|
@@ -29,7 +29,9 @@ vg login # authenticate via browser
|
|
|
29
29
|
vg logout # clear credentials
|
|
30
30
|
vg whoami # show current user
|
|
31
31
|
vg deploy [dir] # deploy a game directory (reads vibedgames.json or --slug)
|
|
32
|
+
vg deployments [delete <slug> --yes] # list your games, or delete one
|
|
32
33
|
vg fork <slug> [target] # fork a project's shipped source under a new slug
|
|
34
|
+
vg skills [name] # list the game-studio skills, or print one's SKILL.md
|
|
33
35
|
vg credits # credit balance + recent usage
|
|
34
36
|
vg factory [args…] # autonomous game agent (optional plugin, installs on first use)
|
|
35
37
|
vg completions <bash|zsh|fish> # print shell completions
|
|
@@ -81,10 +83,13 @@ Run `vg init` in your project to install the full set of game-building skills
|
|
|
81
83
|
## How deploy works
|
|
82
84
|
|
|
83
85
|
1. Picks the build output (`dist`/`build`/`out`) when the directory is a project root
|
|
84
|
-
2. Walks the directory,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
2. Walks the directory, checks the caps and that `index.html` exists, and packs it into one
|
|
87
|
+
`.tgz` bundle
|
|
88
|
+
3. Calls `deploy.upload` with `bundle: true` (and the `--source` archive) — stages a deployment
|
|
89
|
+
beside the live one and gets a signed `/api/upload` URL for the bundle
|
|
90
|
+
4. PUTs the bundle there
|
|
91
|
+
5. Calls `deploy.upload` again with `publish: true` — the server unpacks the bundle and the game
|
|
92
|
+
switches to the new deployment at `{slug}.vibedgames.com`; until then the old one keeps serving
|
|
88
93
|
|
|
89
94
|
Passing `--source` also uploads a forkable source archive, which is what
|
|
90
95
|
`vg fork <slug>` downloads. It is off by default: the archive is readable by
|
|
@@ -92,7 +97,10 @@ any logged-in user, so shipping it is a publish and should be a deliberate act.
|
|
|
92
97
|
|
|
93
98
|
## Auth
|
|
94
99
|
|
|
95
|
-
|
|
96
|
-
polls until the
|
|
100
|
+
`vg login` is OAuth device authorization (RFC 8628): the CLI prints a code,
|
|
101
|
+
opens `/device` in the browser, and polls until the person approves it there.
|
|
102
|
+
The access token and its refresh token are stored at `~/.config/vg/auth.json`
|
|
103
|
+
and refreshed as needed; `vg logout` revokes them, as does Disconnect under
|
|
104
|
+
Settings → Connected apps.
|
|
97
105
|
`VG_TOKEN` overrides it (for CI and headless agents) and `VG_API_URL` points the
|
|
98
106
|
CLI at a non-production API.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
The vg CLI bundles the packages below; each one's licence follows its name.
|
|
2
2
|
|
|
3
3
|
========================================================================
|
|
4
|
-
@orpc/client@2.0.0-beta.
|
|
4
|
+
@orpc/client@2.0.0-beta.45 (MIT)
|
|
5
5
|
========================================================================
|
|
6
6
|
|
|
7
7
|
MIT License
|
|
@@ -27,7 +27,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
27
27
|
SOFTWARE.
|
|
28
28
|
|
|
29
29
|
========================================================================
|
|
30
|
-
@orpc/shared@2.0.0-beta.
|
|
30
|
+
@orpc/shared@2.0.0-beta.45 (MIT)
|
|
31
31
|
========================================================================
|
|
32
32
|
|
|
33
33
|
MIT License
|
|
@@ -53,7 +53,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
53
53
|
SOFTWARE.
|
|
54
54
|
|
|
55
55
|
========================================================================
|
|
56
|
-
@standard-server/core@0.
|
|
56
|
+
@standard-server/core@0.11.0 (MIT)
|
|
57
57
|
========================================================================
|
|
58
58
|
|
|
59
59
|
MIT License
|
|
@@ -79,7 +79,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
79
79
|
SOFTWARE.
|
|
80
80
|
|
|
81
81
|
========================================================================
|
|
82
|
-
@standard-server/fetch@0.
|
|
82
|
+
@standard-server/fetch@0.11.0 (MIT)
|
|
83
83
|
========================================================================
|
|
84
84
|
|
|
85
85
|
MIT License
|
|
@@ -105,7 +105,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
105
105
|
SOFTWARE.
|
|
106
106
|
|
|
107
107
|
========================================================================
|
|
108
|
-
@standard-server/shared@0.
|
|
108
|
+
@standard-server/shared@0.11.0 (MIT)
|
|
109
109
|
========================================================================
|
|
110
110
|
|
|
111
111
|
MIT License
|
|
@@ -235,7 +235,33 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
235
235
|
THE SOFTWARE.
|
|
236
236
|
|
|
237
237
|
========================================================================
|
|
238
|
-
|
|
238
|
+
fflate@0.8.3 (MIT)
|
|
239
|
+
========================================================================
|
|
240
|
+
|
|
241
|
+
MIT License
|
|
242
|
+
|
|
243
|
+
Copyright (c) 2026 Arjun Barrett
|
|
244
|
+
|
|
245
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
246
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
247
|
+
in the Software without restriction, including without limitation the rights
|
|
248
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
249
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
250
|
+
furnished to do so, subject to the following conditions:
|
|
251
|
+
|
|
252
|
+
The above copyright notice and this permission notice shall be included in all
|
|
253
|
+
copies or substantial portions of the Software.
|
|
254
|
+
|
|
255
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
256
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
257
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
258
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
259
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
260
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
261
|
+
SOFTWARE.
|
|
262
|
+
|
|
263
|
+
========================================================================
|
|
264
|
+
ignore@7.0.14 (MIT)
|
|
239
265
|
========================================================================
|
|
240
266
|
|
|
241
267
|
Licensed MIT; the package ships no licence file.
|
|
@@ -381,3 +407,29 @@ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
381
407
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
382
408
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
383
409
|
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
410
|
+
|
|
411
|
+
========================================================================
|
|
412
|
+
zod@4.6.7 (MIT)
|
|
413
|
+
========================================================================
|
|
414
|
+
|
|
415
|
+
MIT License
|
|
416
|
+
|
|
417
|
+
Copyright (c) 2025 Colin McDonnell
|
|
418
|
+
|
|
419
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
420
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
421
|
+
in the Software without restriction, including without limitation the rights
|
|
422
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
423
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
424
|
+
furnished to do so, subject to the following conditions:
|
|
425
|
+
|
|
426
|
+
The above copyright notice and this permission notice shall be included in all
|
|
427
|
+
copies or substantial portions of the Software.
|
|
428
|
+
|
|
429
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
430
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
431
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
432
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
433
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
434
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
435
|
+
SOFTWARE.
|
|
@@ -7,7 +7,7 @@ var __dirname = __pathDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
defineCommand
|
|
9
9
|
} from "./chunk-MBXCVCC4.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-GKDUYJ7R.js";
|
|
11
11
|
|
|
12
12
|
// src/commands/completions.ts
|
|
13
13
|
var SUPPORTED = /* @__PURE__ */ new Set(["bash", "zsh", "fish"]);
|
|
@@ -18,11 +18,13 @@ var SUBCOMMANDS = [
|
|
|
18
18
|
"login",
|
|
19
19
|
"logout",
|
|
20
20
|
"deploy",
|
|
21
|
+
"deployments",
|
|
21
22
|
"playtest",
|
|
22
23
|
"factory",
|
|
23
24
|
"fork",
|
|
24
25
|
"generate",
|
|
25
26
|
"credits",
|
|
27
|
+
"skills",
|
|
26
28
|
"config",
|
|
27
29
|
"update",
|
|
28
30
|
"completions",
|
|
@@ -6,10 +6,10 @@ var __filename = __fileURLToPath(import.meta.url);
|
|
|
6
6
|
var __dirname = __pathDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
resolveSetting
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7CXMMC5S.js";
|
|
10
10
|
import {
|
|
11
11
|
getConfigDir
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RXHTGX7C.js";
|
|
13
13
|
import {
|
|
14
14
|
isJsonNumber,
|
|
15
15
|
isJsonObject,
|
|
@@ -8,17 +8,22 @@ import {
|
|
|
8
8
|
ensureAgentBrowser,
|
|
9
9
|
projectSessionId,
|
|
10
10
|
resolveGameUrl
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-2QBYTIMH.js";
|
|
15
|
-
import "./chunk-ZI6PKVXG.js";
|
|
11
|
+
} from "./chunk-US6QZICZ.js";
|
|
12
|
+
import "./chunk-2VUUMXAQ.js";
|
|
13
|
+
import "./chunk-7CXMMC5S.js";
|
|
16
14
|
import {
|
|
17
15
|
authErrorCode,
|
|
18
16
|
createClient
|
|
19
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KZBZNTM4.js";
|
|
18
|
+
import "./chunk-K2U7L4RU.js";
|
|
20
19
|
import "./chunk-Z4Z24FWO.js";
|
|
21
20
|
import "./chunk-PEUP4MZR.js";
|
|
21
|
+
import {
|
|
22
|
+
getBaseUrl,
|
|
23
|
+
getToken
|
|
24
|
+
} from "./chunk-RXHTGX7C.js";
|
|
25
|
+
import "./chunk-5535KDYI.js";
|
|
26
|
+
import "./chunk-ZI6PKVXG.js";
|
|
22
27
|
import {
|
|
23
28
|
outputArgs,
|
|
24
29
|
writeStructured
|
|
@@ -26,13 +31,9 @@ import {
|
|
|
26
31
|
import {
|
|
27
32
|
assertKnownFlags
|
|
28
33
|
} from "./chunk-RZ4DIJQW.js";
|
|
29
|
-
import {
|
|
30
|
-
getBaseUrl,
|
|
31
|
-
getToken
|
|
32
|
-
} from "./chunk-RYFO3ZPO.js";
|
|
33
34
|
import {
|
|
34
35
|
consola
|
|
35
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-D2RF35HJ.js";
|
|
36
37
|
import {
|
|
37
38
|
isJsonObject,
|
|
38
39
|
isJsonString
|
|
@@ -40,7 +41,7 @@ import {
|
|
|
40
41
|
import {
|
|
41
42
|
defineCommand
|
|
42
43
|
} from "./chunk-MBXCVCC4.js";
|
|
43
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-GKDUYJ7R.js";
|
|
44
45
|
|
|
45
46
|
// src/lib/playtest/browser.ts
|
|
46
47
|
import { spawnSync } from "node:child_process";
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
17
17
|
__toESM
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GKDUYJ7R.js";
|
|
19
19
|
|
|
20
|
-
// ../../node_modules/.pnpm/ignore@7.0.
|
|
20
|
+
// ../../node_modules/.pnpm/ignore@7.0.14/node_modules/ignore/index.js
|
|
21
21
|
var require_ignore = __commonJS({
|
|
22
|
-
"../../node_modules/.pnpm/ignore@7.0.
|
|
22
|
+
"../../node_modules/.pnpm/ignore@7.0.14/node_modules/ignore/index.js"(exports, module) {
|
|
23
23
|
function makeArray(subject) {
|
|
24
24
|
return Array.isArray(subject) ? subject : [subject];
|
|
25
25
|
}
|
|
@@ -30,6 +30,7 @@ var require_ignore = __commonJS({
|
|
|
30
30
|
var REGEX_LITERAL_SPECIAL = /[.*+?()[\]{}^$|\\/]/;
|
|
31
31
|
var BOM = "\uFEFF";
|
|
32
32
|
var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/;
|
|
33
|
+
var REGEX_ANCHORED_GLOBSTAR = /^\/\*{2,}$/;
|
|
33
34
|
var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/;
|
|
34
35
|
var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/;
|
|
35
36
|
var REGEX_SPLITALL_CRLF = /\r?\n/g;
|
|
@@ -47,10 +48,6 @@ var require_ignore = __commonJS({
|
|
|
47
48
|
return value;
|
|
48
49
|
};
|
|
49
50
|
var RETURN_FALSE = () => false;
|
|
50
|
-
var cleanRangeBackSlash = (slashes) => {
|
|
51
|
-
const { length } = slashes;
|
|
52
|
-
return slashes.slice(0, length - length % 2);
|
|
53
|
-
};
|
|
54
51
|
var POSIX_CLASSES = {
|
|
55
52
|
alnum: "0-9A-Za-z",
|
|
56
53
|
alpha: "A-Za-z",
|
|
@@ -121,11 +118,11 @@ var require_ignore = __commonJS({
|
|
|
121
118
|
return null;
|
|
122
119
|
}
|
|
123
120
|
if (end > nameStart && pattern[end - 1] === ":") {
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
121
|
+
const name = pattern.slice(nameStart, end - 1);
|
|
122
|
+
if (!Object.prototype.hasOwnProperty.call(POSIX_CLASSES, name)) {
|
|
126
123
|
return null;
|
|
127
124
|
}
|
|
128
|
-
body +=
|
|
125
|
+
body += POSIX_CLASSES[name];
|
|
129
126
|
prev = EMPTY;
|
|
130
127
|
index = end;
|
|
131
128
|
} else {
|
|
@@ -154,6 +151,7 @@ var require_ignore = __commonJS({
|
|
|
154
151
|
);
|
|
155
152
|
var TRAILING_WILDCARD = "\uE000";
|
|
156
153
|
var TRAILING_DOUBLESTAR = "\uE001";
|
|
154
|
+
var isReserved = (char) => char === PLACEHOLDER || char === TRAILING_WILDCARD || char === TRAILING_DOUBLESTAR;
|
|
157
155
|
var extractBrackets = (pattern) => {
|
|
158
156
|
const sources = [];
|
|
159
157
|
const hold = (source) => `${PLACEHOLDER}${sources.push(source) - 1}${PLACEHOLDER}`;
|
|
@@ -166,16 +164,16 @@ var require_ignore = __commonJS({
|
|
|
166
164
|
const escaped = pattern[index + 1];
|
|
167
165
|
if (escaped === UNDEFINED || escaped === SLASH && index + 2 === length) {
|
|
168
166
|
out += hold(NEVER_MATCH);
|
|
169
|
-
} else if (escaped === "*" || escaped === "[" || escaped === SPACE
|
|
167
|
+
} else if (escaped === "*" || escaped === "[" || escaped === SPACE) {
|
|
170
168
|
out += pattern.slice(index, index + 2);
|
|
171
169
|
} else {
|
|
172
170
|
out += hold(
|
|
173
|
-
REGEX_LITERAL_SPECIAL.test(escaped) ? ESCAPE + escaped : escaped
|
|
171
|
+
REGEX_LITERAL_SPECIAL.test(escaped) ? ESCAPE + escaped : isReserved(escaped) ? `[${escaped}]` : escaped
|
|
174
172
|
);
|
|
175
173
|
}
|
|
176
174
|
index += 2;
|
|
177
|
-
} else if (char
|
|
178
|
-
out += hold(`[${
|
|
175
|
+
} else if (isReserved(char)) {
|
|
176
|
+
out += hold(`[${char}]`);
|
|
179
177
|
index++;
|
|
180
178
|
} else if (char === "[") {
|
|
181
179
|
const scanned = scanBracket(pattern, index);
|
|
@@ -214,6 +212,20 @@ var require_ignore = __commonJS({
|
|
|
214
212
|
(_, run, space) => space ? run.slice(0, run.length - run.length % 2) + SPACE : run,
|
|
215
213
|
ESCAPE + SPACE
|
|
216
214
|
],
|
|
215
|
+
// git's wildmatch() reads a run of two or more asterisks as one globstar
|
|
216
|
+
// whenever the run fills a path segment: it starts the pattern or follows
|
|
217
|
+
// a `/`, and it ends the pattern or comes before a `/`. A run of two is
|
|
218
|
+
// already `**`; a longer one is folded into `**` here, so the steps
|
|
219
|
+
// below only ever have to know `**`.
|
|
220
|
+
// `***/foo` -> `**/foo`, `a/***/b` -> `a/**/b`, `a/***` -> `a/**`
|
|
221
|
+
// git also takes a run beside a literal prefix (`a***/b`) or beside an
|
|
222
|
+
// escaped slash (`***\/b`) as a globstar, and this does not; the README
|
|
223
|
+
// lists both, under "A run of asterisks".
|
|
224
|
+
[
|
|
225
|
+
/(^|\/)\*{3,}(?=\/|$)/g,
|
|
226
|
+
(_, start) => `${start}**`,
|
|
227
|
+
"*"
|
|
228
|
+
],
|
|
217
229
|
// Escape metacharacters
|
|
218
230
|
// which is written down by users but means special for regular expressions.
|
|
219
231
|
// > There are 12 characters with special meanings:
|
|
@@ -310,19 +322,17 @@ var require_ignore = __commonJS({
|
|
|
310
322
|
// trailing wildcard, held apart from a literal star
|
|
311
323
|
[
|
|
312
324
|
// The step above leaves a trailing `*` alone, so a single `\*` is all that
|
|
313
|
-
// can be left at the end here
|
|
314
|
-
//
|
|
315
|
-
//
|
|
316
|
-
//
|
|
317
|
-
//
|
|
318
|
-
//
|
|
319
|
-
//
|
|
320
|
-
// the
|
|
325
|
+
// can be left at the end here, and what stands in front of it says which
|
|
326
|
+
// kind it is. A wildcard arrives as the escaper wrote it, `\*` with
|
|
327
|
+
// nothing before it; a literal arrives as the user's own escape, which
|
|
328
|
+
// the escaper doubled, and then the star's own -- `\\` and then `\*`.
|
|
329
|
+
// There is no third case: every backslash still reaching the chain is
|
|
330
|
+
// one `\*`, `\[` or `\ ` carries itself, and each is followed by its
|
|
331
|
+
// own character, so a longer run can never form. This runs while the
|
|
332
|
+
// two are still distinct, before the unescape steps below collapse the
|
|
333
|
+
// literal onto the very `\*` a wildcard leaves behind.
|
|
321
334
|
/(^|[^\\])((?:\\\\)*)\\\*$/,
|
|
322
|
-
(match, p1, p2) =>
|
|
323
|
-
// `p2` holds the doubled user backslashes; half of them is `N`.
|
|
324
|
-
p2.length / 2 % 2 === 0 ? p1 + p2 + TRAILING_WILDCARD : match
|
|
325
|
-
),
|
|
335
|
+
(match, p1, p2) => p2 === EMPTY ? p1 + TRAILING_WILDCARD : match,
|
|
326
336
|
"*"
|
|
327
337
|
],
|
|
328
338
|
[
|
|
@@ -343,10 +353,11 @@ var require_ignore = __commonJS({
|
|
|
343
353
|
// Every real bracket expression -- POSIX classes included -- has already
|
|
344
354
|
// been held aside by `extractBrackets`, so the only `[` left in the
|
|
345
355
|
// pattern is an escaped, literal one.
|
|
346
|
-
//
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
356
|
+
// A backslash could only stand at the end of the range if it quoted the
|
|
357
|
+
// `]`, and `\]` is held aside long before this.
|
|
358
|
+
/\\\[([^\]/]*?)($|\])/g,
|
|
359
|
+
// '\\[bar]' -> '\\\\[bar]'
|
|
360
|
+
(match, range, close) => `\\[${range}${close}`,
|
|
350
361
|
"["
|
|
351
362
|
],
|
|
352
363
|
// ending
|
|
@@ -476,6 +487,9 @@ var require_ignore = __commonJS({
|
|
|
476
487
|
return out;
|
|
477
488
|
};
|
|
478
489
|
var makeRegexPrefix = (pattern) => {
|
|
490
|
+
if (REGEX_ANCHORED_GLOBSTAR.test(pattern)) {
|
|
491
|
+
pattern = "**";
|
|
492
|
+
}
|
|
479
493
|
const { source, sources } = extractBrackets(pattern);
|
|
480
494
|
const replaced = REPLACERS.reduce(
|
|
481
495
|
// A pass whose matcher finds nothing hands back the very string it was
|
|
@@ -691,39 +705,33 @@ var require_ignore = __commonJS({
|
|
|
691
705
|
}
|
|
692
706
|
// Test one single path without recursively checking parent directories
|
|
693
707
|
//
|
|
694
|
-
// -
|
|
695
|
-
//
|
|
696
|
-
|
|
697
|
-
// - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
|
|
698
|
-
// @returns {TestResult} true if a file is ignored
|
|
699
|
-
test(path2, checkUnignored, mode) {
|
|
700
|
-
let ignored = false;
|
|
701
|
-
let unignored = false;
|
|
702
|
-
let matchedRule;
|
|
708
|
+
// - mode `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
|
|
709
|
+
// @returns {TestResult}
|
|
710
|
+
test(path2, mode) {
|
|
703
711
|
const rules = this._rules;
|
|
704
712
|
const { length } = rules;
|
|
705
713
|
const shortcut = this._basenameCount * 2 >= length;
|
|
706
714
|
const basename = shortcut ? basenameOf(path2) : path2;
|
|
707
|
-
for (let index =
|
|
715
|
+
for (let index = length - 1; index >= 0; index--) {
|
|
708
716
|
const rule = rules[index];
|
|
709
|
-
|
|
710
|
-
const skip = unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored;
|
|
711
|
-
if (!skip && rule[mode].test(
|
|
717
|
+
if (rule[mode].test(
|
|
712
718
|
shortcut && rule._basenameOnly ? basename : path2
|
|
713
719
|
)) {
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
720
|
+
const { negative } = rule;
|
|
721
|
+
const ret = {
|
|
722
|
+
ignored: !negative,
|
|
723
|
+
unignored: negative
|
|
724
|
+
};
|
|
725
|
+
if (!negative) {
|
|
726
|
+
ret.rule = rule;
|
|
727
|
+
}
|
|
728
|
+
return ret;
|
|
717
729
|
}
|
|
718
730
|
}
|
|
719
|
-
|
|
720
|
-
ignored,
|
|
721
|
-
unignored
|
|
731
|
+
return {
|
|
732
|
+
ignored: false,
|
|
733
|
+
unignored: false
|
|
722
734
|
};
|
|
723
|
-
if (matchedRule) {
|
|
724
|
-
ret.rule = matchedRule;
|
|
725
|
-
}
|
|
726
|
-
return ret;
|
|
727
735
|
}
|
|
728
736
|
};
|
|
729
737
|
var throwError = (message, Ctor) => {
|
|
@@ -796,36 +804,36 @@ var require_ignore = __commonJS({
|
|
|
796
804
|
return this.add(pattern);
|
|
797
805
|
}
|
|
798
806
|
// @returns {TestResult}
|
|
799
|
-
_test(originalPath, cache
|
|
807
|
+
_test(originalPath, cache) {
|
|
800
808
|
const path2 = originalPath && checkPath.convert(originalPath);
|
|
801
809
|
checkPath(
|
|
802
810
|
path2,
|
|
803
811
|
originalPath,
|
|
804
812
|
this._strictPathCheck ? throwError : RETURN_FALSE
|
|
805
813
|
);
|
|
806
|
-
return this._t(path2, cache
|
|
814
|
+
return this._t(path2, cache);
|
|
807
815
|
}
|
|
808
816
|
checkIgnore(path2) {
|
|
809
817
|
if (path2.charCodeAt(path2.length - 1) !== SLASH_CODE) {
|
|
810
818
|
return this.test(path2);
|
|
811
819
|
}
|
|
812
|
-
const dir = this._t(path2, this._testCache
|
|
820
|
+
const dir = this._t(path2, this._testCache);
|
|
813
821
|
if (dir.ignored) {
|
|
814
822
|
return dir;
|
|
815
823
|
}
|
|
816
824
|
const literal = this._rules.testLiteral(path2);
|
|
817
825
|
return literal.ignored || literal.unignored ? literal : dir;
|
|
818
826
|
}
|
|
819
|
-
_t(path2, cache
|
|
827
|
+
_t(path2, cache) {
|
|
820
828
|
if (path2 in cache) {
|
|
821
829
|
return cache[path2];
|
|
822
830
|
}
|
|
823
831
|
const parentPath = parentOf(path2);
|
|
824
|
-
const parent = parentPath ? this._t(parentPath, cache
|
|
825
|
-
return cache[path2] = parent && parent.ignored ? parent : this._rules.test(path2,
|
|
832
|
+
const parent = parentPath ? this._t(parentPath, cache) : UNDEFINED;
|
|
833
|
+
return cache[path2] = parent && parent.ignored ? parent : this._rules.test(path2, MODE_IGNORE);
|
|
826
834
|
}
|
|
827
835
|
ignores(path2) {
|
|
828
|
-
return this._test(path2, this._ignoreCache
|
|
836
|
+
return this._test(path2, this._ignoreCache).ignored;
|
|
829
837
|
}
|
|
830
838
|
createFilter() {
|
|
831
839
|
return (path2) => !this.ignores(path2);
|
|
@@ -835,7 +843,7 @@ var require_ignore = __commonJS({
|
|
|
835
843
|
}
|
|
836
844
|
// @returns {TestResult}
|
|
837
845
|
test(path2) {
|
|
838
|
-
return this._test(path2, this._testCache
|
|
846
|
+
return this._test(path2, this._testCache);
|
|
839
847
|
}
|
|
840
848
|
};
|
|
841
849
|
var factory = (options) => new Ignore(options);
|
|
@@ -1052,6 +1060,12 @@ var packSource = async (root, tmpDir) => {
|
|
|
1052
1060
|
sha256: createHash("sha256").update(buf).digest("hex")
|
|
1053
1061
|
};
|
|
1054
1062
|
};
|
|
1063
|
+
var packBuild = async (dir, files, tmpDir) => {
|
|
1064
|
+
mkdirSync(tmpDir, { recursive: true });
|
|
1065
|
+
const tarball = path.join(tmpDir, `vg-build-${process.pid}-${files.length}.tgz`);
|
|
1066
|
+
await Qn({ cwd: dir, file: tarball, gzip: true, portable: true }, files);
|
|
1067
|
+
return { bytes: statSync(tarball).size, path: tarball };
|
|
1068
|
+
};
|
|
1055
1069
|
var extractSource = async (archivePath, destDir) => {
|
|
1056
1070
|
mkdirSync(destDir, { recursive: true });
|
|
1057
1071
|
await So({ cwd: destDir, file: archivePath });
|
|
@@ -1059,5 +1073,6 @@ var extractSource = async (archivePath, destDir) => {
|
|
|
1059
1073
|
|
|
1060
1074
|
export {
|
|
1061
1075
|
packSource,
|
|
1076
|
+
packBuild,
|
|
1062
1077
|
extractSource
|
|
1063
1078
|
};
|