@plasmicapp/cli 0.1.303 → 0.1.305

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.
@@ -0,0 +1,16 @@
1
+ import { CommonArgs } from "..";
2
+ import { I18NConfig } from "../utils/config-utils";
3
+ export interface ExportArgs extends CommonArgs {
4
+ projects: readonly string[];
5
+ platform: "" | "react" | "nextjs" | "gatsby";
6
+ codeLang: "" | "ts" | "js";
7
+ styleScheme: "" | "css" | "css-modules";
8
+ imagesScheme: "" | "inlined" | "files" | "public-files";
9
+ imagesPublicDir: string;
10
+ imagesPublicUrlPrefix: string;
11
+ i18nKeyScheme: "" | I18NConfig["keyScheme"];
12
+ i18nTagPrefix: "" | I18NConfig["tagPrefix"];
13
+ skipFormatting?: boolean;
14
+ outDir: string;
15
+ }
16
+ export declare function exportProjectsCli(opts: ExportArgs): Promise<void>;
@@ -10,4 +10,13 @@ export interface LocalizationStringsArgs extends CommonArgs {
10
10
  tagPrefix: string | undefined;
11
11
  excludeDeps: boolean | undefined;
12
12
  }
13
+ export declare function getLocalizationYargs(key: "key-scheme" | "tag-prefix"): {
14
+ describe: string;
15
+ type: "string";
16
+ choices: string[];
17
+ } | {
18
+ describe: string;
19
+ type: "string";
20
+ choices?: undefined;
21
+ };
13
22
  export declare function localizationStrings(opts: LocalizationStringsArgs): Promise<void>;
@@ -1,4 +1,5 @@
1
1
  import { ChecksumBundle, ProjectMetaBundle } from "../api";
2
2
  import { PlasmicContext, ProjectConfig, ProjectLock } from "../utils/config-utils";
3
+ export declare const DEFAULT_GLOBAL_CONTEXTS_NAME = "PlasmicGlobalContextsProvider";
3
4
  export declare function syncGlobalContexts(context: PlasmicContext, projectMeta: ProjectMetaBundle, projectConfig: ProjectConfig, projectLock: ProjectLock, checksums: ChecksumBundle, baseDir: string): Promise<void>;
4
5
  export declare function getGlobalContextsResourcePath(context: PlasmicContext, projectConfig: ProjectConfig): string;
@@ -2,5 +2,6 @@ import { ChecksumBundle, ImageBundle } from "../api";
2
2
  import { FixImportContext } from "../utils/code-utils";
3
3
  import { PlasmicContext } from "../utils/config-utils";
4
4
  export declare function syncProjectImageAssets(context: PlasmicContext, projectId: string, branchName: string, version: string, imageBundles: ImageBundle[], checksums: ChecksumBundle): Promise<void>;
5
+ export declare function ensureImageAssetContents(bundles: ImageBundle[]): Promise<void>;
5
6
  export declare function fixComponentCssReferences(context: PlasmicContext, fixImportContext: FixImportContext, cssFilePath: string): Promise<void>;
6
7
  export declare function fixComponentImagesReferences(context: PlasmicContext, fixImportContext: FixImportContext, renderModuleFilePath: string): Promise<boolean>;
@@ -11,7 +11,6 @@ export interface SyncArgs extends CommonArgs {
11
11
  quiet?: boolean;
12
12
  metadata?: string;
13
13
  allFiles?: boolean;
14
- loaderConfig?: string;
15
14
  skipFormatting?: boolean;
16
15
  skipBuffering?: boolean;
17
16
  }
package/dist/api.d.ts CHANGED
@@ -13,7 +13,7 @@ export interface ComponentBundle {
13
13
  cssFileName: string;
14
14
  componentName: string;
15
15
  id: string;
16
- scheme: string;
16
+ scheme: "blackbox" | "plain";
17
17
  nameInIdToUuid: Array<[string, string]>;
18
18
  isPage: boolean;
19
19
  plumeType?: string;
@@ -199,6 +199,27 @@ export declare class PlasmicApi {
199
199
  wrapPagesWithGlobalContexts: boolean;
200
200
  metadata?: Metadata;
201
201
  }): Promise<ProjectBundle>;
202
+ /**
203
+ * Code-gen endpoint.
204
+ * This will fetch components from a given branch at an exact specified version
205
+ * using the "plain" scheme
206
+ */
207
+ exportProject(projectId: string, branchName: string, opts: {
208
+ platform: string;
209
+ platformOptions: {
210
+ nextjs?: {
211
+ appDir: boolean;
212
+ };
213
+ };
214
+ version: string;
215
+ imageOpts: ImagesConfig;
216
+ stylesOpts: StyleConfig;
217
+ i18nOpts?: I18NConfig;
218
+ codeOpts: Pick<CodeConfig, "lang">;
219
+ indirect: boolean;
220
+ wrapPagesWithGlobalContexts: boolean;
221
+ metadata?: Metadata;
222
+ }): Promise<ProjectBundle>;
202
223
  projectMeta(projectId: string): Promise<ProjectMetaInfo>;
203
224
  genLocalizationStrings(projects: readonly string[], format: "po" | "json" | "lingui", keyScheme: "content" | "hash" | "path", tagPrefix: string | undefined, projectIdsAndTokens: ProjectIdAndToken[], excludeDeps: boolean | undefined): Promise<string>;
204
225
  uploadBundle(projectId: string, bundleName: string, bundleJs: string, css: string[], metaJson: string, genModulePath: string | undefined, genCssPaths: string[], pkgVersion: string | undefined, extraPropMetaJson: string | undefined, themeProviderWrapper: string | undefined, themeModule: string | undefined): Promise<StyleTokensMap>;