@edenapp/genesis 0.4.0 → 0.5.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/LICENSE +21 -0
- package/README.md +4 -4
- package/dist/bundler.d.ts +26 -73
- package/dist/bundler.d.ts.map +1 -1
- package/dist/bundler.js +453 -506
- package/dist/bundler.js.map +1 -1
- package/dist/bundler.test.js +30 -41
- package/dist/bundler.test.js.map +1 -1
- package/dist/cli.js +22 -28
- package/dist/cli.js.map +1 -1
- package/dist/compression.js +9 -19
- package/dist/compression.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/package.json +9 -10
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Dariusz Majnert
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -133,10 +133,10 @@ An `.edenite` file is a Zstandard-compressed TAR archive with the following stru
|
|
|
133
133
|
## Programmatic API
|
|
134
134
|
|
|
135
135
|
```typescript
|
|
136
|
-
import
|
|
136
|
+
import * as genesisBundler from '@edenapp/genesis';
|
|
137
137
|
|
|
138
138
|
// Bundle an app
|
|
139
|
-
const result = await
|
|
139
|
+
const result = await genesisBundler.bundle({
|
|
140
140
|
appDirectory: './my-app',
|
|
141
141
|
outputPath: './output/my-app.edenite',
|
|
142
142
|
verbose: true,
|
|
@@ -145,7 +145,7 @@ const result = await GenesisBundler.bundle({
|
|
|
145
145
|
});
|
|
146
146
|
|
|
147
147
|
// Extract an app
|
|
148
|
-
const extractResult = await
|
|
148
|
+
const extractResult = await genesisBundler.extract({
|
|
149
149
|
edenitePath: './my-app.edenite',
|
|
150
150
|
outputDirectory: './extracted',
|
|
151
151
|
verbose: true,
|
|
@@ -153,7 +153,7 @@ const extractResult = await GenesisBundler.extract({
|
|
|
153
153
|
});
|
|
154
154
|
|
|
155
155
|
// Get archive info
|
|
156
|
-
const info = await
|
|
156
|
+
const info = await genesisBundler.getInfo('./my-app.edenite');
|
|
157
157
|
console.log(info.manifest);
|
|
158
158
|
console.log(info.checksum);
|
|
159
159
|
```
|
package/dist/bundler.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppManifest } from "@edenapp/types";
|
|
1
|
+
import type { AppManifest } from "@edenapp/types";
|
|
2
2
|
export interface BundleOptions {
|
|
3
3
|
appDirectory: string;
|
|
4
4
|
outputPath?: string;
|
|
@@ -21,76 +21,29 @@ export interface ExtractOptions {
|
|
|
21
21
|
verbose?: boolean;
|
|
22
22
|
verifyChecksum?: boolean;
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export declare
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
*/
|
|
50
|
-
static validateManifest(manifestPath: string): Promise<{
|
|
51
|
-
valid: boolean;
|
|
52
|
-
errors: string[];
|
|
53
|
-
manifest?: AppManifest;
|
|
54
|
-
}>;
|
|
55
|
-
/**
|
|
56
|
-
* Verify that required files exist
|
|
57
|
-
*/
|
|
58
|
-
static verifyFiles(appDirectory: string, manifest: AppManifest): Promise<{
|
|
59
|
-
valid: boolean;
|
|
60
|
-
errors: string[];
|
|
61
|
-
}>;
|
|
62
|
-
/**
|
|
63
|
-
* Check if a file path should be excluded from bundling
|
|
64
|
-
*/
|
|
65
|
-
private static shouldExcludeFile;
|
|
66
|
-
/**
|
|
67
|
-
* Extract app files directly to a directory (no compression)
|
|
68
|
-
*/
|
|
69
|
-
private static extractToDirectory;
|
|
70
|
-
/**
|
|
71
|
-
* Create a TAR archive and compress with Zstandard
|
|
72
|
-
*/
|
|
73
|
-
private static createArchive;
|
|
74
|
-
/**
|
|
75
|
-
* Bundle an app into .edenite format or extract to directory
|
|
76
|
-
*/
|
|
77
|
-
static bundle(options: BundleOptions): Promise<BundleResult>;
|
|
78
|
-
/**
|
|
79
|
-
* Extract info from an .edenite file
|
|
80
|
-
*/
|
|
81
|
-
static getInfo(edenitePath: string): Promise<{
|
|
82
|
-
success: boolean;
|
|
83
|
-
manifest?: AppManifest;
|
|
84
|
-
error?: string;
|
|
85
|
-
checksum?: string;
|
|
86
|
-
}>;
|
|
87
|
-
/**
|
|
88
|
-
* Extract an .edenite file to a directory
|
|
89
|
-
*/
|
|
90
|
-
static extract(options: ExtractOptions): Promise<{
|
|
91
|
-
success: boolean;
|
|
92
|
-
error?: string;
|
|
93
|
-
manifest?: AppManifest;
|
|
94
|
-
}>;
|
|
95
|
-
}
|
|
24
|
+
export declare function executeBuild(appDirectory: string, manifest: AppManifest, verbose?: boolean): Promise<{
|
|
25
|
+
success: boolean;
|
|
26
|
+
error?: string;
|
|
27
|
+
}>;
|
|
28
|
+
export declare function validateManifest(manifestPath: string): Promise<{
|
|
29
|
+
valid: boolean;
|
|
30
|
+
errors: string[];
|
|
31
|
+
manifest?: AppManifest;
|
|
32
|
+
}>;
|
|
33
|
+
export declare function verifyFiles(appDirectory: string, manifest: AppManifest): Promise<{
|
|
34
|
+
valid: boolean;
|
|
35
|
+
errors: string[];
|
|
36
|
+
}>;
|
|
37
|
+
export declare function bundle(options: BundleOptions): Promise<BundleResult>;
|
|
38
|
+
export declare function getInfo(edenitePath: string): Promise<{
|
|
39
|
+
success: boolean;
|
|
40
|
+
manifest?: AppManifest;
|
|
41
|
+
error?: string;
|
|
42
|
+
checksum?: string;
|
|
43
|
+
}>;
|
|
44
|
+
export declare function extract(options: ExtractOptions): Promise<{
|
|
45
|
+
success: boolean;
|
|
46
|
+
error?: string;
|
|
47
|
+
manifest?: AppManifest;
|
|
48
|
+
}>;
|
|
96
49
|
//# sourceMappingURL=bundler.d.ts.map
|
package/dist/bundler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../src/bundler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../src/bundler.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAalD,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB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