@penvhq/launcher 0.14.0 → 0.16.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/dist/bin.cjs +243 -30
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-WA5LM767.js → chunk-HQTTS5BH.js} +250 -35
- package/dist/chunk-HQTTS5BH.js.map +1 -0
- package/dist/index.cjs +249 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +35 -15
- package/dist/index.d.ts +35 -15
- package/dist/index.js +7 -5
- package/package.json +3 -3
- package/dist/chunk-WA5LM767.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -92,19 +92,22 @@ declare function add(options: AddOptions): Promise<AddResult>;
|
|
|
92
92
|
* The file is the user's, so it is scanned rather than parsed and re-emitted:
|
|
93
93
|
* reformatting someone's config — dropping its comments, resorting its keys — to
|
|
94
94
|
* change one string is not the edit that was offered. The scanner understands
|
|
95
|
-
* exactly one thing, the `
|
|
95
|
+
* exactly one thing, the `environments` block, and answers "I do not know this
|
|
96
96
|
* file" for anything else rather than guessing at a rewrite.
|
|
97
|
+
*
|
|
98
|
+
* An entry comes in two shapes and both are repointable: the bare package string
|
|
99
|
+
* is replaced whole, and the object form has its `provider` string replaced.
|
|
97
100
|
*/
|
|
98
|
-
/** One environment's
|
|
99
|
-
interface
|
|
101
|
+
/** One environment's declared provider, as the `environments` block writes it. */
|
|
102
|
+
interface EnvironmentProvider {
|
|
100
103
|
readonly environment: string;
|
|
101
|
-
/** The package it names today,
|
|
102
|
-
readonly
|
|
104
|
+
/** The package it names today — the shorthand string, or the entry's `provider`. */
|
|
105
|
+
readonly provider: string | undefined;
|
|
103
106
|
}
|
|
104
|
-
/** Every environment the `
|
|
105
|
-
declare function
|
|
106
|
-
/** The same text with one environment pointed at `
|
|
107
|
-
declare function
|
|
107
|
+
/** Every environment the `environments` block names, in the order the file declares them. */
|
|
108
|
+
declare function readEnvironmentProviders(source: string): EnvironmentProvider[] | undefined;
|
|
109
|
+
/** The same text with one environment pointed at `provider`, or `undefined` if it cannot be. */
|
|
110
|
+
declare function setEnvironmentProvider(source: string, environment: string, provider: string): string | undefined;
|
|
108
111
|
|
|
109
112
|
/**
|
|
110
113
|
* The committed, type-only declaration an added extension contributes.
|
|
@@ -117,7 +120,12 @@ declare function setProviderType(source: string, environment: string, type: stri
|
|
|
117
120
|
*
|
|
118
121
|
* A package points at that declaration with `penv.types` in its `package.json`;
|
|
119
122
|
* one that ships none gets the open base shape under its own name, which is
|
|
120
|
-
* still enough for the `
|
|
123
|
+
* still enough for the `provider` field to be checked against something real.
|
|
124
|
+
*
|
|
125
|
+
* This is also where core's reserved entry fields are enforced. A declaration is
|
|
126
|
+
* the only way a provider's shape enters the system, so refusing one here makes a
|
|
127
|
+
* collision with `provider` or `keySource` impossible by construction rather than
|
|
128
|
+
* a check every config load pays for.
|
|
121
129
|
*/
|
|
122
130
|
/** What an extension's `package.json` tells `add`, and nothing more. */
|
|
123
131
|
interface ExtensionPackage {
|
|
@@ -405,6 +413,17 @@ declare class DeclarationNotSelfContainedError extends PenvError {
|
|
|
405
413
|
readonly name = "DeclarationNotSelfContainedError";
|
|
406
414
|
constructor(name: string, file: string, specifier: string);
|
|
407
415
|
}
|
|
416
|
+
/**
|
|
417
|
+
* The declaration a package ships names a field core owns on every entry.
|
|
418
|
+
*
|
|
419
|
+
* An environment entry carries the provider's own vocabulary beside core's four
|
|
420
|
+
* names, so a shape declaring one of them would shadow what penv writes there —
|
|
421
|
+
* the discriminant, or the key that seals the environment.
|
|
422
|
+
*/
|
|
423
|
+
declare class DeclarationReservedFieldError extends PenvError {
|
|
424
|
+
readonly name = "DeclarationReservedFieldError";
|
|
425
|
+
constructor(name: string, file: string, field: string);
|
|
426
|
+
}
|
|
408
427
|
/** A launcher built from source, asked to record which bytes it just ran. */
|
|
409
428
|
declare class EnginePinUnreleasedError extends PenvError {
|
|
410
429
|
readonly name = "EnginePinUnreleasedError";
|
|
@@ -433,10 +452,11 @@ declare class UpgradeNoDownloadError extends PenvError {
|
|
|
433
452
|
/**
|
|
434
453
|
* `penv upgrade` on a machine with nobody at it.
|
|
435
454
|
*
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
*
|
|
439
|
-
*
|
|
455
|
+
* What upgrade rewrites is two committed files, so unattended it needs the flag
|
|
456
|
+
* that says somebody meant it. The version stays optional there, exactly as it is
|
|
457
|
+
* interactively: absent means `latest`, the same default `penv add` takes. A
|
|
458
|
+
* pipeline that wants today's pin rather than today's `latest` runs
|
|
459
|
+
* `penv install`, which is what the remedy names.
|
|
440
460
|
*/
|
|
441
461
|
declare class UpgradeUnattendedError extends PenvError {
|
|
442
462
|
readonly name = "UpgradeUnattendedError";
|
|
@@ -731,4 +751,4 @@ interface UpgradeOptions {
|
|
|
731
751
|
}
|
|
732
752
|
declare function upgrade(options: UpgradeOptions): Promise<void>;
|
|
733
753
|
|
|
734
|
-
export { AddFlagError, AddLocalFlagError, AddLocalInCiError, AddNoDownloadError, type AddOptions, AddPackageNameError, AddRegistryError, type AddResult, AddSubjectError, AddTrustUnattendedError, ArchiveError, type ArchiveSubject, BUNDLED_ENGINE_PIN, DEFAULT_REGISTRY, DEV_PIN_INTEGRITY, DEV_PIN_VERSION, DeclarationMissingError, DeclarationNotSelfContainedError, type DeclarationSubject, type Delegation, DownloadFailedError, DownloadIntegrityError, ENGINE_BIN, type Engine, EngineEntryError, EnginePinMismatchError, EnginePinUnreleasedError, ExtensionNotImportableError, type ExtensionPackage, ExtensionUnloadableError, type Fetcher, HOME_META_FILE, INSTALL_COMMAND, INTEGRITY_FILE, InstallDeclinedError, type InstallOptions, type InstallState, type Installation, LOCAL_FLAG, type LauncherIo, type LauncherOptions, LocalExtensionUnresolvedError, MIN_PACKAGE_AGE_DAYS, NPM_UPDATE_COMMAND, NoProjectError, OfficialRegistryError, PackageCorruptError, PackageMissingError, PackageTooYoungError, PackageUnknownError, type Pin, type Project,
|
|
754
|
+
export { AddFlagError, AddLocalFlagError, AddLocalInCiError, AddNoDownloadError, type AddOptions, AddPackageNameError, AddRegistryError, type AddResult, AddSubjectError, AddTrustUnattendedError, ArchiveError, type ArchiveSubject, BUNDLED_ENGINE_PIN, DEFAULT_REGISTRY, DEV_PIN_INTEGRITY, DEV_PIN_VERSION, DeclarationMissingError, DeclarationNotSelfContainedError, DeclarationReservedFieldError, type DeclarationSubject, type Delegation, DownloadFailedError, DownloadIntegrityError, ENGINE_BIN, type Engine, EngineEntryError, EnginePinMismatchError, EnginePinUnreleasedError, type EnvironmentProvider, ExtensionNotImportableError, type ExtensionPackage, ExtensionUnloadableError, type Fetcher, HOME_META_FILE, INSTALL_COMMAND, INTEGRITY_FILE, InstallDeclinedError, type InstallOptions, type InstallState, type Installation, LOCAL_FLAG, type LauncherIo, type LauncherOptions, LocalExtensionUnresolvedError, MIN_PACKAGE_AGE_DAYS, NPM_UPDATE_COMMAND, NoProjectError, OfficialRegistryError, PackageCorruptError, PackageMissingError, PackageTooYoungError, PackageUnknownError, type Pin, type Project, RegistryUnreadableError, type Release, ReleaseIncompleteError, type ReleaseQuery, type Spawner, TRUST_YOUNG_FLAG, type TarEntry, TrustDeclinedError, TrustPublisherMissingError, TrustReasonMissingError, UPGRADE_COMMAND, UpgradeDeclinedError, UpgradeFlagError, UpgradeInstallFailedError, UpgradeNoDownloadError, type UpgradeOptions, UpgradeSubjectError, UpgradeUnattendedError, VersionUnknownError, YES_FLAG, add, assertReleasePin, bundledEngine, declarationPath, engineAt, fetchRelease, findAdoptedRoot, findProject, httpFetcher, inspectInstall, installPin, integrityOf, launcherUpdateCommand, nodeSpawner, packumentUrl, readEnvironmentProviders, readExtensionPackage, readTarball, releaseEnginePin, renderDeclaration, runLauncher, setEnvironmentProvider, tarballUrl, upgrade, writeDeclaration };
|
package/dist/index.d.ts
CHANGED
|
@@ -92,19 +92,22 @@ declare function add(options: AddOptions): Promise<AddResult>;
|
|
|
92
92
|
* The file is the user's, so it is scanned rather than parsed and re-emitted:
|
|
93
93
|
* reformatting someone's config — dropping its comments, resorting its keys — to
|
|
94
94
|
* change one string is not the edit that was offered. The scanner understands
|
|
95
|
-
* exactly one thing, the `
|
|
95
|
+
* exactly one thing, the `environments` block, and answers "I do not know this
|
|
96
96
|
* file" for anything else rather than guessing at a rewrite.
|
|
97
|
+
*
|
|
98
|
+
* An entry comes in two shapes and both are repointable: the bare package string
|
|
99
|
+
* is replaced whole, and the object form has its `provider` string replaced.
|
|
97
100
|
*/
|
|
98
|
-
/** One environment's
|
|
99
|
-
interface
|
|
101
|
+
/** One environment's declared provider, as the `environments` block writes it. */
|
|
102
|
+
interface EnvironmentProvider {
|
|
100
103
|
readonly environment: string;
|
|
101
|
-
/** The package it names today,
|
|
102
|
-
readonly
|
|
104
|
+
/** The package it names today — the shorthand string, or the entry's `provider`. */
|
|
105
|
+
readonly provider: string | undefined;
|
|
103
106
|
}
|
|
104
|
-
/** Every environment the `
|
|
105
|
-
declare function
|
|
106
|
-
/** The same text with one environment pointed at `
|
|
107
|
-
declare function
|
|
107
|
+
/** Every environment the `environments` block names, in the order the file declares them. */
|
|
108
|
+
declare function readEnvironmentProviders(source: string): EnvironmentProvider[] | undefined;
|
|
109
|
+
/** The same text with one environment pointed at `provider`, or `undefined` if it cannot be. */
|
|
110
|
+
declare function setEnvironmentProvider(source: string, environment: string, provider: string): string | undefined;
|
|
108
111
|
|
|
109
112
|
/**
|
|
110
113
|
* The committed, type-only declaration an added extension contributes.
|
|
@@ -117,7 +120,12 @@ declare function setProviderType(source: string, environment: string, type: stri
|
|
|
117
120
|
*
|
|
118
121
|
* A package points at that declaration with `penv.types` in its `package.json`;
|
|
119
122
|
* one that ships none gets the open base shape under its own name, which is
|
|
120
|
-
* still enough for the `
|
|
123
|
+
* still enough for the `provider` field to be checked against something real.
|
|
124
|
+
*
|
|
125
|
+
* This is also where core's reserved entry fields are enforced. A declaration is
|
|
126
|
+
* the only way a provider's shape enters the system, so refusing one here makes a
|
|
127
|
+
* collision with `provider` or `keySource` impossible by construction rather than
|
|
128
|
+
* a check every config load pays for.
|
|
121
129
|
*/
|
|
122
130
|
/** What an extension's `package.json` tells `add`, and nothing more. */
|
|
123
131
|
interface ExtensionPackage {
|
|
@@ -405,6 +413,17 @@ declare class DeclarationNotSelfContainedError extends PenvError {
|
|
|
405
413
|
readonly name = "DeclarationNotSelfContainedError";
|
|
406
414
|
constructor(name: string, file: string, specifier: string);
|
|
407
415
|
}
|
|
416
|
+
/**
|
|
417
|
+
* The declaration a package ships names a field core owns on every entry.
|
|
418
|
+
*
|
|
419
|
+
* An environment entry carries the provider's own vocabulary beside core's four
|
|
420
|
+
* names, so a shape declaring one of them would shadow what penv writes there —
|
|
421
|
+
* the discriminant, or the key that seals the environment.
|
|
422
|
+
*/
|
|
423
|
+
declare class DeclarationReservedFieldError extends PenvError {
|
|
424
|
+
readonly name = "DeclarationReservedFieldError";
|
|
425
|
+
constructor(name: string, file: string, field: string);
|
|
426
|
+
}
|
|
408
427
|
/** A launcher built from source, asked to record which bytes it just ran. */
|
|
409
428
|
declare class EnginePinUnreleasedError extends PenvError {
|
|
410
429
|
readonly name = "EnginePinUnreleasedError";
|
|
@@ -433,10 +452,11 @@ declare class UpgradeNoDownloadError extends PenvError {
|
|
|
433
452
|
/**
|
|
434
453
|
* `penv upgrade` on a machine with nobody at it.
|
|
435
454
|
*
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
*
|
|
439
|
-
*
|
|
455
|
+
* What upgrade rewrites is two committed files, so unattended it needs the flag
|
|
456
|
+
* that says somebody meant it. The version stays optional there, exactly as it is
|
|
457
|
+
* interactively: absent means `latest`, the same default `penv add` takes. A
|
|
458
|
+
* pipeline that wants today's pin rather than today's `latest` runs
|
|
459
|
+
* `penv install`, which is what the remedy names.
|
|
440
460
|
*/
|
|
441
461
|
declare class UpgradeUnattendedError extends PenvError {
|
|
442
462
|
readonly name = "UpgradeUnattendedError";
|
|
@@ -731,4 +751,4 @@ interface UpgradeOptions {
|
|
|
731
751
|
}
|
|
732
752
|
declare function upgrade(options: UpgradeOptions): Promise<void>;
|
|
733
753
|
|
|
734
|
-
export { AddFlagError, AddLocalFlagError, AddLocalInCiError, AddNoDownloadError, type AddOptions, AddPackageNameError, AddRegistryError, type AddResult, AddSubjectError, AddTrustUnattendedError, ArchiveError, type ArchiveSubject, BUNDLED_ENGINE_PIN, DEFAULT_REGISTRY, DEV_PIN_INTEGRITY, DEV_PIN_VERSION, DeclarationMissingError, DeclarationNotSelfContainedError, type DeclarationSubject, type Delegation, DownloadFailedError, DownloadIntegrityError, ENGINE_BIN, type Engine, EngineEntryError, EnginePinMismatchError, EnginePinUnreleasedError, ExtensionNotImportableError, type ExtensionPackage, ExtensionUnloadableError, type Fetcher, HOME_META_FILE, INSTALL_COMMAND, INTEGRITY_FILE, InstallDeclinedError, type InstallOptions, type InstallState, type Installation, LOCAL_FLAG, type LauncherIo, type LauncherOptions, LocalExtensionUnresolvedError, MIN_PACKAGE_AGE_DAYS, NPM_UPDATE_COMMAND, NoProjectError, OfficialRegistryError, PackageCorruptError, PackageMissingError, PackageTooYoungError, PackageUnknownError, type Pin, type Project,
|
|
754
|
+
export { AddFlagError, AddLocalFlagError, AddLocalInCiError, AddNoDownloadError, type AddOptions, AddPackageNameError, AddRegistryError, type AddResult, AddSubjectError, AddTrustUnattendedError, ArchiveError, type ArchiveSubject, BUNDLED_ENGINE_PIN, DEFAULT_REGISTRY, DEV_PIN_INTEGRITY, DEV_PIN_VERSION, DeclarationMissingError, DeclarationNotSelfContainedError, DeclarationReservedFieldError, type DeclarationSubject, type Delegation, DownloadFailedError, DownloadIntegrityError, ENGINE_BIN, type Engine, EngineEntryError, EnginePinMismatchError, EnginePinUnreleasedError, type EnvironmentProvider, ExtensionNotImportableError, type ExtensionPackage, ExtensionUnloadableError, type Fetcher, HOME_META_FILE, INSTALL_COMMAND, INTEGRITY_FILE, InstallDeclinedError, type InstallOptions, type InstallState, type Installation, LOCAL_FLAG, type LauncherIo, type LauncherOptions, LocalExtensionUnresolvedError, MIN_PACKAGE_AGE_DAYS, NPM_UPDATE_COMMAND, NoProjectError, OfficialRegistryError, PackageCorruptError, PackageMissingError, PackageTooYoungError, PackageUnknownError, type Pin, type Project, RegistryUnreadableError, type Release, ReleaseIncompleteError, type ReleaseQuery, type Spawner, TRUST_YOUNG_FLAG, type TarEntry, TrustDeclinedError, TrustPublisherMissingError, TrustReasonMissingError, UPGRADE_COMMAND, UpgradeDeclinedError, UpgradeFlagError, UpgradeInstallFailedError, UpgradeNoDownloadError, type UpgradeOptions, UpgradeSubjectError, UpgradeUnattendedError, VersionUnknownError, YES_FLAG, add, assertReleasePin, bundledEngine, declarationPath, engineAt, fetchRelease, findAdoptedRoot, findProject, httpFetcher, inspectInstall, installPin, integrityOf, launcherUpdateCommand, nodeSpawner, packumentUrl, readEnvironmentProviders, readExtensionPackage, readTarball, releaseEnginePin, renderDeclaration, runLauncher, setEnvironmentProvider, tarballUrl, upgrade, writeDeclaration };
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
DEV_PIN_VERSION,
|
|
15
15
|
DeclarationMissingError,
|
|
16
16
|
DeclarationNotSelfContainedError,
|
|
17
|
+
DeclarationReservedFieldError,
|
|
17
18
|
DownloadFailedError,
|
|
18
19
|
DownloadIntegrityError,
|
|
19
20
|
ENGINE_BIN,
|
|
@@ -66,17 +67,17 @@ import {
|
|
|
66
67
|
launcherUpdateCommand,
|
|
67
68
|
nodeSpawner,
|
|
68
69
|
packumentUrl,
|
|
70
|
+
readEnvironmentProviders,
|
|
69
71
|
readExtensionPackage,
|
|
70
|
-
readProviderEntries,
|
|
71
72
|
readTarball,
|
|
72
73
|
releaseEnginePin,
|
|
73
74
|
renderDeclaration,
|
|
74
75
|
runLauncher,
|
|
75
|
-
|
|
76
|
+
setEnvironmentProvider,
|
|
76
77
|
tarballUrl,
|
|
77
78
|
upgrade,
|
|
78
79
|
writeDeclaration
|
|
79
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-HQTTS5BH.js";
|
|
80
81
|
export {
|
|
81
82
|
AddFlagError,
|
|
82
83
|
AddLocalFlagError,
|
|
@@ -93,6 +94,7 @@ export {
|
|
|
93
94
|
DEV_PIN_VERSION,
|
|
94
95
|
DeclarationMissingError,
|
|
95
96
|
DeclarationNotSelfContainedError,
|
|
97
|
+
DeclarationReservedFieldError,
|
|
96
98
|
DownloadFailedError,
|
|
97
99
|
DownloadIntegrityError,
|
|
98
100
|
ENGINE_BIN,
|
|
@@ -145,13 +147,13 @@ export {
|
|
|
145
147
|
launcherUpdateCommand,
|
|
146
148
|
nodeSpawner,
|
|
147
149
|
packumentUrl,
|
|
150
|
+
readEnvironmentProviders,
|
|
148
151
|
readExtensionPackage,
|
|
149
|
-
readProviderEntries,
|
|
150
152
|
readTarball,
|
|
151
153
|
releaseEnginePin,
|
|
152
154
|
renderDeclaration,
|
|
153
155
|
runLauncher,
|
|
154
|
-
|
|
156
|
+
setEnvironmentProvider,
|
|
155
157
|
tarballUrl,
|
|
156
158
|
upgrade,
|
|
157
159
|
writeDeclaration
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@penvhq/launcher",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "The stable penv launcher: it verifies the engine your project pins and hands over the command.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"zod": "4.4.3",
|
|
31
|
-
"@penvhq/cli": "0.
|
|
32
|
-
"@penvhq/core": "0.
|
|
31
|
+
"@penvhq/cli": "0.16.0",
|
|
32
|
+
"@penvhq/core": "0.16.0"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"build": "tsup"
|