piral-cli 0.14.1 → 0.14.3-beta.3296
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/lib/apps/build-pilet.d.ts +6 -2
- package/lib/apps/build-pilet.js +92 -38
- package/lib/apps/build-pilet.js.map +1 -1
- package/lib/apps/debug-pilet.d.ts +2 -2
- package/lib/apps/publish-pilet.d.ts +9 -1
- package/lib/apps/publish-pilet.js +64 -28
- package/lib/apps/publish-pilet.js.map +1 -1
- package/lib/build/bundler-calls.js +8 -2
- package/lib/build/bundler-calls.js.map +1 -1
- package/lib/commands.js +12 -2
- package/lib/commands.js.map +1 -1
- package/lib/common/compatibility.js +4 -0
- package/lib/common/compatibility.js.map +1 -1
- package/lib/common/index.d.ts +1 -0
- package/lib/common/index.js +1 -0
- package/lib/common/index.js.map +1 -1
- package/lib/common/io.js +12 -4
- package/lib/common/io.js.map +1 -1
- package/lib/common/npm.d.ts +2 -1
- package/lib/common/npm.js +34 -8
- package/lib/common/npm.js.map +1 -1
- package/lib/common/spec.d.ts +29 -0
- package/lib/common/spec.js +57 -0
- package/lib/common/spec.js.map +1 -0
- package/lib/helpers.d.ts +3 -2
- package/lib/helpers.js +3 -2
- package/lib/helpers.js.map +1 -1
- package/lib/injectors/pilet.d.ts +2 -2
- package/lib/injectors/pilet.js +32 -74
- package/lib/injectors/pilet.js.map +1 -1
- package/lib/messages.d.ts +14 -1
- package/lib/messages.js +23 -3
- package/lib/messages.js.map +1 -1
- package/lib/rules/pilet-uses-latest-piral.js +17 -8
- package/lib/rules/pilet-uses-latest-piral.js.map +1 -1
- package/lib/types/public.d.ts +1 -0
- package/package.json +2 -2
- package/src/apps/build-pilet.ts +144 -46
- package/src/apps/debug-pilet.ts +2 -2
- package/src/apps/publish-pilet.ts +99 -29
- package/src/build/bundler-calls.ts +10 -2
- package/src/commands.ts +14 -3
- package/src/common/compatibility.ts +6 -0
- package/src/common/index.ts +1 -0
- package/src/common/io.ts +16 -6
- package/src/common/npm.ts +44 -11
- package/src/common/spec.ts +58 -0
- package/src/helpers.ts +10 -2
- package/src/injectors/pilet.ts +31 -78
- package/src/messages.ts +22 -2
- package/src/rules/pilet-uses-latest-piral.ts +21 -11
- package/src/types/public.ts +2 -0
package/src/messages.ts
CHANGED
|
@@ -1026,8 +1026,8 @@ export function missingPiletFeedUrl_0060(): QuickMessage {
|
|
|
1026
1026
|
* Using multiple commands is preferred if you use custom options, otherwise
|
|
1027
1027
|
* just go for the single command.
|
|
1028
1028
|
*/
|
|
1029
|
-
export function missingPiletTarball_0061(
|
|
1030
|
-
return [LogLevels.error, '0061', `No files found using pattern "${
|
|
1029
|
+
export function missingPiletTarball_0061(sources: Array<string>): QuickMessage {
|
|
1030
|
+
return [LogLevels.error, '0061', `No files found using pattern "${sources.join('", "')}".`];
|
|
1031
1031
|
}
|
|
1032
1032
|
|
|
1033
1033
|
/**
|
|
@@ -1842,6 +1842,26 @@ export function toolingIncompatible_0101(piralVersion: string, cliVersion: strin
|
|
|
1842
1842
|
];
|
|
1843
1843
|
}
|
|
1844
1844
|
|
|
1845
|
+
/**
|
|
1846
|
+
* @kind Info
|
|
1847
|
+
*
|
|
1848
|
+
* @summary
|
|
1849
|
+
* The Piral CLI could not detect the tooling version used by the app shell. Therefore, it may be incompatible to the
|
|
1850
|
+
* currently used version of the piral-cli. Keep an eye on weird errors.
|
|
1851
|
+
*
|
|
1852
|
+
* @abstract
|
|
1853
|
+
* The emulator contains a special section to inform the Piral CLI about the used version of the tooling. This is
|
|
1854
|
+
* important to detect potential alignment or incompatibilities. The used version of the emulator does not contain
|
|
1855
|
+
* this information and therefore may be incompatible.
|
|
1856
|
+
*/
|
|
1857
|
+
export function appShellMaybeIncompatible_0102(cliVersion: string): QuickMessage {
|
|
1858
|
+
return [
|
|
1859
|
+
LogLevels.info,
|
|
1860
|
+
'0100',
|
|
1861
|
+
`The Piral instance's CLI version is unknown and may be incompatible to the used version (${cliVersion}).`,
|
|
1862
|
+
];
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1845
1865
|
/**
|
|
1846
1866
|
* @kind Error
|
|
1847
1867
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { findLatestVersion } from '../common';
|
|
1
|
+
import { isMonorepoPackageRef, findLatestVersion } from '../common';
|
|
2
2
|
import { PiletRuleContext } from '../types';
|
|
3
3
|
|
|
4
4
|
export type Options = 'suggest' | 'required' | 'ignore';
|
|
@@ -13,17 +13,27 @@ export default async function (context: PiletRuleContext, options: Options = 'su
|
|
|
13
13
|
const isfixed = demanded.startsWith('git+') || demanded.startsWith('file:');
|
|
14
14
|
|
|
15
15
|
if (!isfixed) {
|
|
16
|
-
const
|
|
16
|
+
const isMonorepoRef = await isMonorepoPackageRef(name, context.root);
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
`
|
|
22
|
-
The used version of "${name}"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
// either we are not in a monorepo or the app shell is not part of the monorepo
|
|
19
|
+
if (!isMonorepoRef) {
|
|
20
|
+
const latestVersion = await findLatestVersion(name).catch((err) => {
|
|
21
|
+
context.warning(`
|
|
22
|
+
The used version of "${name}" could not be determined: ${err}.
|
|
23
|
+
`);
|
|
24
|
+
return version;
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
if (version !== latestVersion) {
|
|
28
|
+
const notify = options === 'required' ? context.error : context.warning;
|
|
29
|
+
notify(
|
|
30
|
+
`
|
|
31
|
+
The used version of "${name}" is outdated.
|
|
32
|
+
Expected: v${latestVersion}.
|
|
33
|
+
Received: v${version}.
|
|
34
|
+
`,
|
|
35
|
+
);
|
|
36
|
+
}
|
|
27
37
|
}
|
|
28
38
|
}
|
|
29
39
|
}
|
package/src/types/public.ts
CHANGED
|
@@ -217,6 +217,8 @@ export type PiletPublishSource = 'local' | 'npm' | 'remote';
|
|
|
217
217
|
|
|
218
218
|
export type PiralBuildType = 'all' | 'release' | 'emulator' | 'emulator-sources';
|
|
219
219
|
|
|
220
|
+
export type PiletBuildType = 'default' | 'standalone';
|
|
221
|
+
|
|
220
222
|
export type PackageType = 'registry' | 'file' | 'git';
|
|
221
223
|
|
|
222
224
|
export type NpmClientType = 'npm' | 'yarn' | 'pnpm';
|