@proteinjs/reflection-build 1.2.0 → 1.3.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/CHANGELOG.md +11 -0
- package/dist/src/build.js +30 -15
- package/dist/src/build.js.map +1 -1
- package/dist/src/codegen/writeGeneratedIndex.d.ts +7 -1
- package/dist/src/codegen/writeGeneratedIndex.js +13 -5
- package/dist/src/codegen/writeGeneratedIndex.js.map +1 -1
- package/dist/src/parser/createSourceGraph.d.ts +1 -1
- package/dist/src/parser/createSourceGraph.js +36 -22
- package/dist/src/parser/createSourceGraph.js.map +1 -1
- package/package.json +4 -4
- package/src/build.ts +45 -14
- package/src/codegen/writeGeneratedIndex.ts +23 -4
- package/src/parser/createSourceGraph.ts +21 -12
- package/test/examples/source-repository/a/dist/build.js +30 -15
- package/test/examples/source-repository/a/dist/build.js.map +1 -1
- package/test/examples/source-repository/a/dist/codegen/writeGeneratedIndex.d.ts +7 -1
- package/test/examples/source-repository/a/dist/codegen/writeGeneratedIndex.js +13 -5
- package/test/examples/source-repository/a/dist/codegen/writeGeneratedIndex.js.map +1 -1
- package/test/examples/source-repository/a/dist/parser/createSourceGraph.d.ts +1 -1
- package/test/examples/source-repository/a/dist/parser/createSourceGraph.js +36 -22
- package/test/examples/source-repository/a/dist/parser/createSourceGraph.js.map +1 -1
- package/test/examples/source-repository/a/node_modules/.package-lock.json +6 -6
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/CHANGELOG.md +13 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/Fs.d.ts +23 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/Fs.js +67 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/Fs.js.map +1 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/GitUtil.d.ts +297 -10
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/GitUtil.js +349 -112
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/GitUtil.js.map +1 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/cmd.d.ts +10 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/cmd.js +91 -48
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/dist/src/cmd.js.map +1 -1
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/package.json +2 -2
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/src/Fs.ts +75 -0
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/src/GitUtil.ts +248 -110
- package/test/examples/source-repository/a/node_modules/@proteinjs/util-node/src/cmd.ts +84 -59
- package/test/examples/source-repository/a/package-lock.json +8 -8
- package/test/examples/source-repository/a/package.json +2 -2
- package/test/examples/source-repository/b/dist/build.js +30 -15
- package/test/examples/source-repository/b/dist/build.js.map +1 -1
- package/test/examples/source-repository/b/dist/codegen/writeGeneratedIndex.d.ts +7 -1
- package/test/examples/source-repository/b/dist/codegen/writeGeneratedIndex.js +13 -5
- package/test/examples/source-repository/b/dist/codegen/writeGeneratedIndex.js.map +1 -1
- package/test/examples/source-repository/b/dist/parser/createSourceGraph.d.ts +1 -1
- package/test/examples/source-repository/b/dist/parser/createSourceGraph.js +36 -22
- package/test/examples/source-repository/b/dist/parser/createSourceGraph.js.map +1 -1
- package/test/examples/source-repository/b/node_modules/.package-lock.json +4 -4
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/CHANGELOG.md +13 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/Fs.d.ts +23 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/Fs.js +67 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/Fs.js.map +1 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/GitUtil.d.ts +297 -10
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/GitUtil.js +349 -112
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/GitUtil.js.map +1 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/cmd.d.ts +10 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/cmd.js +91 -48
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/cmd.js.map +1 -1
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/package.json +2 -2
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/src/Fs.ts +75 -0
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/src/GitUtil.ts +248 -110
- package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/src/cmd.ts +84 -59
- package/test/examples/source-repository/b/package-lock.json +6 -6
- package/test/examples/source-repository/b/package.json +2 -2
package/test/examples/source-repository/b/node_modules/@proteinjs/util-node/dist/src/GitUtil.d.ts
CHANGED
|
@@ -1,14 +1,39 @@
|
|
|
1
|
+
import type { LogOptions } from './cmd';
|
|
2
|
+
type LogPassThrough = {
|
|
3
|
+
log?: LogOptions;
|
|
4
|
+
};
|
|
1
5
|
export declare class GitUtil {
|
|
2
|
-
static cloneAppTemplatePackages(directory: string): Promise<void>;
|
|
3
|
-
static init(directory: string): Promise<void>;
|
|
4
|
-
static setRemote(directory: string, remote: string): Promise<void>;
|
|
5
|
-
static addRemote(directory: string, remote: string): Promise<void>;
|
|
6
|
-
static commit(directory: string, message: string): Promise<void>;
|
|
7
|
-
static pull(directory: string): Promise<void>;
|
|
8
|
-
static push(directory: string): Promise<void>;
|
|
9
|
-
static status(directory: string): Promise<void>;
|
|
10
|
-
static addAll(directory: string): Promise<void>;
|
|
11
|
-
static sync(directory: string): Promise<void>;
|
|
6
|
+
static cloneAppTemplatePackages(directory: string, opts?: LogPassThrough): Promise<void>;
|
|
7
|
+
static init(directory: string, opts?: LogPassThrough): Promise<void>;
|
|
8
|
+
static setRemote(directory: string, remote: string, opts?: LogPassThrough): Promise<void>;
|
|
9
|
+
static addRemote(directory: string, remote: string, opts?: LogPassThrough): Promise<void>;
|
|
10
|
+
static commit(directory: string, message: string, opts?: LogPassThrough): Promise<void>;
|
|
11
|
+
static pull(directory: string, opts?: LogPassThrough): Promise<void>;
|
|
12
|
+
static push(directory: string, opts?: LogPassThrough): Promise<void>;
|
|
13
|
+
static status(directory: string, opts?: LogPassThrough): Promise<void>;
|
|
14
|
+
static addAll(directory: string, opts?: LogPassThrough): Promise<void>;
|
|
15
|
+
static sync(directory: string, opts?: LogPassThrough): Promise<void>;
|
|
16
|
+
/** Return the current branch name. */
|
|
17
|
+
static currentBranch(directory: string, opts?: LogPassThrough): Promise<string>;
|
|
18
|
+
/** Return the current HEAD SHA. */
|
|
19
|
+
static headSha(directory: string, opts?: LogPassThrough): Promise<string>;
|
|
20
|
+
/** Create and switch to a new branch. */
|
|
21
|
+
static createBranch(directory: string, name: string, opts?: LogPassThrough): Promise<void>;
|
|
22
|
+
/** Checkout an existing branch. */
|
|
23
|
+
static checkout(directory: string, name: string, opts?: LogPassThrough): Promise<void>;
|
|
24
|
+
/** Return a binary-safe patch between two refs (from..to). Defaults to no logging. */
|
|
25
|
+
static diffPatch(directory: string, fromRef: string, toRef: string, opts?: LogPassThrough): Promise<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Apply a patch to the working tree (stdin piped). Defaults to no logging.
|
|
28
|
+
* When `staged` is true, applies to the index only; otherwise as unstaged changes.
|
|
29
|
+
* When `reverse` is true, applies the patch in reverse.
|
|
30
|
+
*/
|
|
31
|
+
static applyPatch(directory: string, patch: string, opts?: {
|
|
32
|
+
staged?: boolean;
|
|
33
|
+
reverse?: boolean;
|
|
34
|
+
log?: LogOptions;
|
|
35
|
+
}): Promise<void>;
|
|
36
|
+
static hasStagedChanges(directory: string, opts?: LogPassThrough): Promise<boolean>;
|
|
12
37
|
}
|
|
13
38
|
export declare const cloneAppTemplatePackagesFunctionName = "cloneAppTemplatePackages";
|
|
14
39
|
export declare const cloneAppTemplatePackagesFunction: {
|
|
@@ -225,6 +250,163 @@ export declare const syncFunction: {
|
|
|
225
250
|
directory: string;
|
|
226
251
|
}) => Promise<void>;
|
|
227
252
|
};
|
|
253
|
+
export declare const currentBranchFunctionName = "gitCurrentBranch";
|
|
254
|
+
export declare const currentBranchFunction: {
|
|
255
|
+
definition: {
|
|
256
|
+
name: string;
|
|
257
|
+
description: string;
|
|
258
|
+
parameters: {
|
|
259
|
+
type: string;
|
|
260
|
+
properties: {
|
|
261
|
+
directory: {
|
|
262
|
+
type: string;
|
|
263
|
+
description: string;
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
required: string[];
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
call: (params: {
|
|
270
|
+
directory: string;
|
|
271
|
+
}) => Promise<string>;
|
|
272
|
+
};
|
|
273
|
+
export declare const headShaFunctionName = "gitHeadSha";
|
|
274
|
+
export declare const headShaFunction: {
|
|
275
|
+
definition: {
|
|
276
|
+
name: string;
|
|
277
|
+
description: string;
|
|
278
|
+
parameters: {
|
|
279
|
+
type: string;
|
|
280
|
+
properties: {
|
|
281
|
+
directory: {
|
|
282
|
+
type: string;
|
|
283
|
+
description: string;
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
required: string[];
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
call: (params: {
|
|
290
|
+
directory: string;
|
|
291
|
+
}) => Promise<string>;
|
|
292
|
+
};
|
|
293
|
+
export declare const createBranchFunctionName = "gitCreateBranch";
|
|
294
|
+
export declare const createBranchFunction: {
|
|
295
|
+
definition: {
|
|
296
|
+
name: string;
|
|
297
|
+
description: string;
|
|
298
|
+
parameters: {
|
|
299
|
+
type: string;
|
|
300
|
+
properties: {
|
|
301
|
+
directory: {
|
|
302
|
+
type: string;
|
|
303
|
+
description: string;
|
|
304
|
+
};
|
|
305
|
+
name: {
|
|
306
|
+
type: string;
|
|
307
|
+
description: string;
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
required: string[];
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
call: (params: {
|
|
314
|
+
directory: string;
|
|
315
|
+
name: string;
|
|
316
|
+
}) => Promise<void>;
|
|
317
|
+
};
|
|
318
|
+
export declare const checkoutFunctionName = "gitCheckout";
|
|
319
|
+
export declare const checkoutFunction: {
|
|
320
|
+
definition: {
|
|
321
|
+
name: string;
|
|
322
|
+
description: string;
|
|
323
|
+
parameters: {
|
|
324
|
+
type: string;
|
|
325
|
+
properties: {
|
|
326
|
+
directory: {
|
|
327
|
+
type: string;
|
|
328
|
+
description: string;
|
|
329
|
+
};
|
|
330
|
+
name: {
|
|
331
|
+
type: string;
|
|
332
|
+
description: string;
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
required: string[];
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
call: (params: {
|
|
339
|
+
directory: string;
|
|
340
|
+
name: string;
|
|
341
|
+
}) => Promise<void>;
|
|
342
|
+
};
|
|
343
|
+
export declare const diffPatchFunctionName = "gitDiffPatch";
|
|
344
|
+
export declare const diffPatchFunction: {
|
|
345
|
+
definition: {
|
|
346
|
+
name: string;
|
|
347
|
+
description: string;
|
|
348
|
+
parameters: {
|
|
349
|
+
type: string;
|
|
350
|
+
properties: {
|
|
351
|
+
directory: {
|
|
352
|
+
type: string;
|
|
353
|
+
description: string;
|
|
354
|
+
};
|
|
355
|
+
from: {
|
|
356
|
+
type: string;
|
|
357
|
+
description: string;
|
|
358
|
+
};
|
|
359
|
+
to: {
|
|
360
|
+
type: string;
|
|
361
|
+
description: string;
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
required: string[];
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
call: (params: {
|
|
368
|
+
directory: string;
|
|
369
|
+
from: string;
|
|
370
|
+
to: string;
|
|
371
|
+
}) => Promise<string>;
|
|
372
|
+
};
|
|
373
|
+
export declare const applyPatchFunctionName = "gitApplyPatch";
|
|
374
|
+
export declare const applyPatchFunction: {
|
|
375
|
+
definition: {
|
|
376
|
+
name: string;
|
|
377
|
+
description: string;
|
|
378
|
+
parameters: {
|
|
379
|
+
type: string;
|
|
380
|
+
properties: {
|
|
381
|
+
directory: {
|
|
382
|
+
type: string;
|
|
383
|
+
description: string;
|
|
384
|
+
};
|
|
385
|
+
patch: {
|
|
386
|
+
type: string;
|
|
387
|
+
description: string;
|
|
388
|
+
};
|
|
389
|
+
reverse: {
|
|
390
|
+
type: string;
|
|
391
|
+
description: string;
|
|
392
|
+
default: boolean;
|
|
393
|
+
};
|
|
394
|
+
staged: {
|
|
395
|
+
type: string;
|
|
396
|
+
description: string;
|
|
397
|
+
default: boolean;
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
required: string[];
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
call: (params: {
|
|
404
|
+
directory: string;
|
|
405
|
+
patch: string;
|
|
406
|
+
reverse?: boolean;
|
|
407
|
+
staged?: boolean;
|
|
408
|
+
}) => Promise<void>;
|
|
409
|
+
};
|
|
228
410
|
export declare const gitFunctions: ({
|
|
229
411
|
definition: {
|
|
230
412
|
name: string;
|
|
@@ -289,4 +471,109 @@ export declare const gitFunctions: ({
|
|
|
289
471
|
directory: string;
|
|
290
472
|
message: string;
|
|
291
473
|
}) => Promise<void>;
|
|
474
|
+
} | {
|
|
475
|
+
definition: {
|
|
476
|
+
name: string;
|
|
477
|
+
description: string;
|
|
478
|
+
parameters: {
|
|
479
|
+
type: string;
|
|
480
|
+
properties: {
|
|
481
|
+
directory: {
|
|
482
|
+
type: string;
|
|
483
|
+
description: string;
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
required: string[];
|
|
487
|
+
};
|
|
488
|
+
};
|
|
489
|
+
call: (params: {
|
|
490
|
+
directory: string;
|
|
491
|
+
}) => Promise<string>;
|
|
492
|
+
} | {
|
|
493
|
+
definition: {
|
|
494
|
+
name: string;
|
|
495
|
+
description: string;
|
|
496
|
+
parameters: {
|
|
497
|
+
type: string;
|
|
498
|
+
properties: {
|
|
499
|
+
directory: {
|
|
500
|
+
type: string;
|
|
501
|
+
description: string;
|
|
502
|
+
};
|
|
503
|
+
name: {
|
|
504
|
+
type: string;
|
|
505
|
+
description: string;
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
required: string[];
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
call: (params: {
|
|
512
|
+
directory: string;
|
|
513
|
+
name: string;
|
|
514
|
+
}) => Promise<void>;
|
|
515
|
+
} | {
|
|
516
|
+
definition: {
|
|
517
|
+
name: string;
|
|
518
|
+
description: string;
|
|
519
|
+
parameters: {
|
|
520
|
+
type: string;
|
|
521
|
+
properties: {
|
|
522
|
+
directory: {
|
|
523
|
+
type: string;
|
|
524
|
+
description: string;
|
|
525
|
+
};
|
|
526
|
+
from: {
|
|
527
|
+
type: string;
|
|
528
|
+
description: string;
|
|
529
|
+
};
|
|
530
|
+
to: {
|
|
531
|
+
type: string;
|
|
532
|
+
description: string;
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
required: string[];
|
|
536
|
+
};
|
|
537
|
+
};
|
|
538
|
+
call: (params: {
|
|
539
|
+
directory: string;
|
|
540
|
+
from: string;
|
|
541
|
+
to: string;
|
|
542
|
+
}) => Promise<string>;
|
|
543
|
+
} | {
|
|
544
|
+
definition: {
|
|
545
|
+
name: string;
|
|
546
|
+
description: string;
|
|
547
|
+
parameters: {
|
|
548
|
+
type: string;
|
|
549
|
+
properties: {
|
|
550
|
+
directory: {
|
|
551
|
+
type: string;
|
|
552
|
+
description: string;
|
|
553
|
+
};
|
|
554
|
+
patch: {
|
|
555
|
+
type: string;
|
|
556
|
+
description: string;
|
|
557
|
+
};
|
|
558
|
+
reverse: {
|
|
559
|
+
type: string;
|
|
560
|
+
description: string;
|
|
561
|
+
default: boolean;
|
|
562
|
+
};
|
|
563
|
+
staged: {
|
|
564
|
+
type: string;
|
|
565
|
+
description: string;
|
|
566
|
+
default: boolean;
|
|
567
|
+
};
|
|
568
|
+
};
|
|
569
|
+
required: string[];
|
|
570
|
+
};
|
|
571
|
+
};
|
|
572
|
+
call: (params: {
|
|
573
|
+
directory: string;
|
|
574
|
+
patch: string;
|
|
575
|
+
reverse?: boolean;
|
|
576
|
+
staged?: boolean;
|
|
577
|
+
}) => Promise<void>;
|
|
292
578
|
})[];
|
|
579
|
+
export {};
|