@openfn/project 0.13.0 → 0.13.1

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/dist/index.d.ts CHANGED
@@ -89,6 +89,7 @@ type FromFsConfig = {
89
89
  config?: Partial<l.WorkspaceConfig>;
90
90
  logger?: Logger;
91
91
  alias?: string;
92
+ name?: string;
92
93
  };
93
94
 
94
95
  type SerializedProject = Omit<Partial<l.Project>, 'workflows'> & {
package/dist/index.js CHANGED
@@ -64,7 +64,7 @@ function to_app_state_default(project, options = {}) {
64
64
  pick(project, ["name", "description", "collections"]),
65
65
  isNil
66
66
  );
67
- state.id = uuid;
67
+ state.id = uuid ?? randomUUID();
68
68
  Object.assign(state, rest, project.options);
69
69
  state.project_credentials = project.credentials ?? [];
70
70
  state.workflows = project.workflows.map(mapWorkflow).reduce((obj, wf) => {
@@ -894,8 +894,8 @@ var parseProject = async (options) => {
894
894
  const context = loadWorkspaceFile(content, type);
895
895
  const config = buildConfig(options.config ?? context.workspace);
896
896
  const proj = {
897
- id: context.project?.id,
898
- name: context.project?.name,
897
+ id: options.name ? slugify(options.name) : context.project?.id,
898
+ name: options.name ? slugify(options.name) : context.project?.name,
899
899
  openfn: omit2(context.project, ["id", "forked_from"]),
900
900
  config,
901
901
  workflows: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/project",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "description": "Read, serialize, replicate and sync OpenFn projects",
5
5
  "type": "module",
6
6
  "exports": {