@cmssy/cli 0.6.10 → 0.6.11

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.
@@ -1,6 +1,6 @@
1
1
  import { GraphQLClient } from "graphql-request";
2
2
  export declare function createClient(): GraphQLClient;
3
- export declare const IMPORT_BLOCK_MUTATION = "\n mutation ImportBlock($input: ImportBlockInput!) {\n importBlock(input: $input) {\n id\n blockType\n name\n description\n icon\n category\n layoutPosition\n schemaFields {\n key\n type\n label\n defaultValue\n placeholder\n required\n helperText\n options\n minValue\n maxValue\n minItems\n maxItems\n multiple\n itemSchema\n group\n showWhen {\n field\n equals\n notEquals\n notEmpty\n isEmpty\n }\n validation {\n minLength\n maxLength\n min\n max\n pattern\n message\n }\n }\n defaultContent\n requires {\n auth\n language\n workspace\n modules\n permissions\n features\n }\n version\n createdAt\n }\n }\n";
3
+ export declare const IMPORT_BLOCK_MUTATION: string;
4
4
  export declare const IMPORT_TEMPLATE_MUTATION = "\n mutation ImportTemplate($input: ImportTemplateInput!) {\n importTemplate(input: $input) {\n success\n block {\n id\n blockType\n name\n version\n }\n pagesCreated\n pagesUpdated\n message\n }\n }\n";
5
5
  export declare const ADD_BLOCK_SOURCE_CODE_MUTATION = "\n mutation AddBlockSourceCode($input: AddBlockSourceCodeInput!) {\n addBlockSourceCode(input: $input) {\n id\n blockType\n name\n sourceUrl\n sourceCssUrl\n dependenciesUrl\n }\n }\n";
6
6
  export declare const GET_WORKSPACE_BLOCKS_QUERY = "\n query GetWorkspaceBlocks {\n workspaceBlocks {\n id\n blockType\n name\n sourceUrl\n }\n }\n";
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../src/utils/graphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,wBAAgB,YAAY,IAAI,aAAa,CAa5C;AAGD,eAAO,MAAM,qBAAqB,u8BAuDjC,CAAC;AAEF,eAAO,MAAM,wBAAwB,+QAepC,CAAC;AAEF,eAAO,MAAM,8BAA8B,kOAW1C,CAAC;AAEF,eAAO,MAAM,0BAA0B,gIAStC,CAAC"}
1
+ {"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../src/utils/graphql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,wBAAgB,YAAY,IAAI,aAAa,CAa5C;AAKD,eAAO,MAAM,qBAAqB,QA0BjC,CAAC;AAEF,eAAO,MAAM,wBAAwB,+QAepC,CAAC;AAEF,eAAO,MAAM,8BAA8B,kOAW1C,CAAC;AAEF,eAAO,MAAM,0BAA0B,gIAStC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { GraphQLClient } from "graphql-request";
2
+ import { blockFieldGraphQLSelection } from "@cmssy/types";
2
3
  import { loadConfig } from "./config.js";
3
4
  export function createClient() {
4
5
  const config = loadConfig();
@@ -12,6 +13,7 @@ export function createClient() {
12
13
  },
13
14
  });
14
15
  }
16
+ const SCHEMA_FIELDS_FRAGMENT = blockFieldGraphQLSelection();
15
17
  // GraphQL Mutations
16
18
  export const IMPORT_BLOCK_MUTATION = `
17
19
  mutation ImportBlock($input: ImportBlockInput!) {
@@ -24,36 +26,7 @@ export const IMPORT_BLOCK_MUTATION = `
24
26
  category
25
27
  layoutPosition
26
28
  schemaFields {
27
- key
28
- type
29
- label
30
- defaultValue
31
- placeholder
32
- required
33
- helperText
34
- options
35
- minValue
36
- maxValue
37
- minItems
38
- maxItems
39
- multiple
40
- itemSchema
41
- group
42
- showWhen {
43
- field
44
- equals
45
- notEquals
46
- notEmpty
47
- isEmpty
48
- }
49
- validation {
50
- minLength
51
- maxLength
52
- min
53
- max
54
- pattern
55
- message
56
- }
29
+ ${SCHEMA_FIELDS_FRAGMENT}
57
30
  }
58
31
  defaultContent
59
32
  requires {
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../src/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I,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE;QACtC,OAAO,EAAE;YACP,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,UAAU,MAAM,CAAC,QAAQ,EAAE;SAC3C;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAM,sBAAsB,GAAG,0BAA0B,EAAE,CAAC;AAE5D,oBAAoB;AACpB,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;UAW3B,sBAAsB;;;;;;;;;;;;;;;CAe/B,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;;;;;;CAevC,CAAC;AAEF,MAAM,CAAC,MAAM,8BAA8B,GAAG;;;;;;;;;;;CAW7C,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;;CASzC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmssy/cli",
3
- "version": "0.6.10",
3
+ "version": "0.6.11",
4
4
  "description": "Unified CLI for building and publishing blocks to Cmssy design library",
5
5
  "type": "module",
6
6
  "bin": {
@@ -48,7 +48,7 @@
48
48
  "access": "public"
49
49
  },
50
50
  "dependencies": {
51
- "@cmssy/types": "^0.5.7",
51
+ "@cmssy/types": "^0.6.0",
52
52
  "@tailwindcss/postcss": "^4.1.18",
53
53
  "archiver": "^7.0.1",
54
54
  "chalk": "^5.3.0",