piral-cli 0.15.0-beta.4560 → 0.15.0-beta.4607
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.js +5 -5
- package/lib/apps/build-pilet.js.map +1 -1
- package/lib/apps/debug-pilet.js +2 -1
- package/lib/apps/debug-pilet.js.map +1 -1
- package/lib/apps/publish-pilet.js +2 -2
- package/lib/apps/publish-pilet.js.map +1 -1
- package/lib/apps/validate-pilet.js +4 -14
- package/lib/apps/validate-pilet.js.map +1 -1
- package/lib/common/package.d.ts +2 -5
- package/lib/common/package.js +43 -40
- package/lib/common/package.js.map +1 -1
- package/lib/messages.d.ts +44 -0
- package/lib/messages.js +49 -2
- package/lib/messages.js.map +1 -1
- package/lib/rules/pilet-has-externals-as-peers.js +2 -1
- package/lib/rules/pilet-has-externals-as-peers.js.map +1 -1
- package/lib/rules/pilet-has-no-self-reference.js +1 -1
- package/lib/rules/pilet-has-no-self-reference.js.map +1 -1
- package/lib/rules/pilet-stays-small.js +1 -1
- package/lib/rules/pilet-stays-small.js.map +1 -1
- package/lib/rules/pilet-uses-latest-piral.js +1 -1
- package/lib/rules/pilet-uses-latest-piral.js.map +1 -1
- package/lib/types/common.d.ts +44 -7
- package/lib/types/common.js.map +1 -1
- package/lib/types/internal.d.ts +1 -33
- package/package.json +3 -3
- package/src/apps/build-pilet.ts +8 -6
- package/src/apps/debug-pilet.ts +2 -2
- package/src/apps/publish-pilet.ts +2 -2
- package/src/apps/validate-pilet.ts +5 -4
- package/src/common/package.test.ts +6 -1
- package/src/common/package.ts +53 -41
- package/src/messages.ts +47 -0
- package/src/rules/pilet-has-externals-as-peers.test.ts +2 -2
- package/src/rules/pilet-has-externals-as-peers.ts +2 -1
- package/src/rules/pilet-has-no-self-reference.ts +1 -1
- package/src/rules/pilet-stays-small.ts +1 -1
- package/src/rules/pilet-uses-latest-piral.ts +1 -1
- package/src/types/common.ts +51 -8
- package/src/types/internal.ts +1 -38
package/src/types/common.ts
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
+
export interface Importmap {
|
|
2
|
+
imports: Record<string, string>;
|
|
3
|
+
inherit: Array<string>;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface PackageData {
|
|
7
|
+
name: string;
|
|
8
|
+
version: string;
|
|
9
|
+
description: string;
|
|
10
|
+
importmap?: Importmap;
|
|
11
|
+
main: string;
|
|
12
|
+
author:
|
|
13
|
+
| string
|
|
14
|
+
| {
|
|
15
|
+
name?: string;
|
|
16
|
+
url?: string;
|
|
17
|
+
email?: string;
|
|
18
|
+
};
|
|
19
|
+
dependencies: Record<string, string>;
|
|
20
|
+
peerDependencies: Record<string, string>;
|
|
21
|
+
devDependencies: Record<string, string>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Shape of the package.json of a pilet
|
|
25
|
+
export interface PiletPackageData extends PackageData {
|
|
26
|
+
piral?: {
|
|
27
|
+
name: string;
|
|
28
|
+
};
|
|
29
|
+
custom?: any;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Shape of the package.json of a Piral instance or emulator
|
|
33
|
+
export interface PiralPackageData extends PackageData {
|
|
34
|
+
pilets?: PiletsInfo;
|
|
35
|
+
piralCLI?: { generated: boolean; version: string };
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface PiralInstancePackageData extends PiralPackageData {
|
|
39
|
+
root: string;
|
|
40
|
+
app: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface AppDefinition {
|
|
44
|
+
appPackage: PiralInstancePackageData;
|
|
45
|
+
appFile: string;
|
|
46
|
+
appRoot: string;
|
|
47
|
+
emulator: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
1
50
|
export enum LogLevels {
|
|
2
51
|
/**
|
|
3
52
|
* Logging disabled
|
|
@@ -101,14 +150,8 @@ export interface PiralRuleContext extends RuleContext {
|
|
|
101
150
|
}
|
|
102
151
|
|
|
103
152
|
export interface PiletRuleContext extends RuleContext {
|
|
104
|
-
|
|
153
|
+
apps: Array<AppDefinition>;
|
|
154
|
+
piletPackage: any;
|
|
105
155
|
peerModules: Array<string>;
|
|
106
156
|
importmap: Array<SharedDependency>;
|
|
107
157
|
}
|
|
108
|
-
|
|
109
|
-
export interface PiralData {
|
|
110
|
-
appRoot: string;
|
|
111
|
-
appFile: string;
|
|
112
|
-
appPackage: any;
|
|
113
|
-
piletPackage: any;
|
|
114
|
-
}
|
package/src/types/internal.ts
CHANGED
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
import type { LogLevels
|
|
2
|
-
|
|
3
|
-
export interface Importmap {
|
|
4
|
-
imports: Record<string, string>;
|
|
5
|
-
inherit: Array<string>;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface PackageData {
|
|
9
|
-
name: string;
|
|
10
|
-
version: string;
|
|
11
|
-
description: string;
|
|
12
|
-
importmap?: Importmap;
|
|
13
|
-
main: string;
|
|
14
|
-
author:
|
|
15
|
-
| string
|
|
16
|
-
| {
|
|
17
|
-
name?: string;
|
|
18
|
-
url?: string;
|
|
19
|
-
email?: string;
|
|
20
|
-
};
|
|
21
|
-
dependencies: Record<string, string>;
|
|
22
|
-
peerDependencies: Record<string, string>;
|
|
23
|
-
devDependencies: Record<string, string>;
|
|
24
|
-
}
|
|
1
|
+
import type { LogLevels } from './common';
|
|
25
2
|
|
|
26
3
|
/**
|
|
27
4
|
* Shape of the pilet.json
|
|
@@ -35,20 +12,6 @@ export interface PiletDefinition {
|
|
|
35
12
|
>;
|
|
36
13
|
}
|
|
37
14
|
|
|
38
|
-
// Shape of the package.json of a pilet
|
|
39
|
-
export interface PiletPackageData extends PackageData {
|
|
40
|
-
piral?: {
|
|
41
|
-
name: string;
|
|
42
|
-
};
|
|
43
|
-
custom?: any;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Shape of the package.json of a Piral instance or emulator
|
|
47
|
-
export interface PiralPackageData extends PackageData {
|
|
48
|
-
pilets?: PiletsInfo;
|
|
49
|
-
piralCLI?: { generated: boolean; version: string };
|
|
50
|
-
}
|
|
51
|
-
|
|
52
15
|
export interface PackageFiles {
|
|
53
16
|
[file: string]: Buffer;
|
|
54
17
|
}
|