easc 0.0.3 → 0.0.4
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/index.ts +12 -8
- package/package.json +1 -1
- package/src/utils/files.ts +7 -7
- package/src/utils/logger.ts +2 -1
- package/src/utils/runtime.ts +1 -1
- package/src/utils/upload.ts +4 -4
package/index.ts
CHANGED
|
@@ -2,20 +2,24 @@
|
|
|
2
2
|
import { execSync } from "child_process";
|
|
3
3
|
import fs from "fs";
|
|
4
4
|
import chalk from "chalk";
|
|
5
|
-
import { parseArguments } from "./src/utils/cli";
|
|
6
|
-
import { validateConfig, getConfig } from "./src/utils/schema";
|
|
7
|
-
import { resolveRuntimeVersion, getPlatforms } from "./src/utils/runtime";
|
|
8
|
-
import {
|
|
5
|
+
import { parseArguments } from "./src/utils/cli.ts";
|
|
6
|
+
import { validateConfig, getConfig } from "./src/utils/schema.ts";
|
|
7
|
+
import { resolveRuntimeVersion, getPlatforms } from "./src/utils/runtime.ts";
|
|
8
|
+
import {
|
|
9
|
+
getCommitHash,
|
|
10
|
+
getShortCommitHash,
|
|
11
|
+
isGitClean,
|
|
12
|
+
} from "./src/utils/git.ts";
|
|
9
13
|
import {
|
|
10
14
|
readAppJson,
|
|
11
15
|
readMetadata,
|
|
12
16
|
findBundleFile,
|
|
13
17
|
getAssetFiles,
|
|
14
18
|
checkExportDirectory,
|
|
15
|
-
} from "./src/utils/files";
|
|
16
|
-
import { uploadBundle, createDryRunSummary } from "./src/utils/upload";
|
|
17
|
-
import { Logger } from "./src/utils/logger";
|
|
18
|
-
import { PlatformType } from "./src/enums/platform";
|
|
19
|
+
} from "./src/utils/files.ts";
|
|
20
|
+
import { uploadBundle, createDryRunSummary } from "./src/utils/upload.ts";
|
|
21
|
+
import { Logger } from "./src/utils/logger.ts";
|
|
22
|
+
import type { PlatformType } from "./src/enums/platform.ts";
|
|
19
23
|
|
|
20
24
|
type IDeploymentResult = {
|
|
21
25
|
platform: PlatformType;
|
package/package.json
CHANGED
package/src/utils/files.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
|
-
import { IAppJson } from "./runtime";
|
|
4
|
-
import {
|
|
3
|
+
import type { IAppJson } from "./runtime.ts";
|
|
4
|
+
import type { PlatformType } from "../enums/platform.ts";
|
|
5
5
|
|
|
6
6
|
export interface IMetadata {
|
|
7
7
|
fileMetadata?: {
|
|
8
|
-
|
|
8
|
+
ios?: {
|
|
9
9
|
assets: Array<{ path: string }>;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
android?: {
|
|
12
12
|
assets: Array<{ path: string }>;
|
|
13
13
|
};
|
|
14
14
|
};
|
|
@@ -96,9 +96,9 @@ export function getAssetFiles(
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
const platformMetadata =
|
|
99
|
-
platform ===
|
|
100
|
-
? metadata.fileMetadata?.
|
|
101
|
-
: metadata.fileMetadata?.
|
|
99
|
+
platform === "ios"
|
|
100
|
+
? metadata.fileMetadata?.ios
|
|
101
|
+
: metadata.fileMetadata?.android;
|
|
102
102
|
const platformAssets = platformMetadata?.assets || [];
|
|
103
103
|
|
|
104
104
|
if (platformAssets.length === 0) {
|
package/src/utils/logger.ts
CHANGED
package/src/utils/runtime.ts
CHANGED
package/src/utils/upload.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
|
-
import { IAppJson } from "./runtime";
|
|
3
|
-
import { IMetadata } from "./files";
|
|
4
|
-
import { IConfig } from "./schema";
|
|
5
|
-
import { PlatformType } from "../enums/platform";
|
|
2
|
+
import type { IAppJson } from "./runtime.ts";
|
|
3
|
+
import type { IMetadata } from "./files.ts";
|
|
4
|
+
import type { IConfig } from "./schema.ts";
|
|
5
|
+
import type { PlatformType } from "../enums/platform.ts";
|
|
6
6
|
|
|
7
7
|
export interface IUploadOptions {
|
|
8
8
|
config: IConfig;
|