@akanjs/cli 0.0.72 → 0.0.74

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.js CHANGED
@@ -82,9 +82,6 @@ var getCredentials = (app, environment) => {
82
82
  return secret[environment];
83
83
  };
84
84
 
85
- // pkgs/@akanjs/devkit/src/getDependencies.ts
86
- var import_devkit = require("@nx/devkit");
87
-
88
85
  // pkgs/@akanjs/devkit/src/uploadRelease.ts
89
86
  var import_axios = __toESM(require("axios"), 1);
90
87
  var import_form_data = __toESM(require("form-data"), 1);
@@ -1963,8 +1960,8 @@ var getArgumentValue = async (argMeta, value, workspace) => {
1963
1960
  throw new Error(`Invalid system type: ${argMeta.type}`);
1964
1961
  };
1965
1962
  var runCommands = async (...commands) => {
1966
- const hasPackageJson = import_fs10.default.existsSync("package.json");
1967
- const version = hasPackageJson ? JSON.parse(import_fs10.default.readFileSync("package.json", "utf8")).version : "0.0.1";
1963
+ const hasPackageJson = import_fs10.default.existsSync(`${__dirname}/package.json`);
1964
+ const version = hasPackageJson ? JSON.parse(import_fs10.default.readFileSync(`${__dirname}/package.json`, "utf8")).version : "0.0.1";
1968
1965
  import_commander.program.version(version).description("Akan CLI");
1969
1966
  for (const command of commands) {
1970
1967
  const targetMetas = getTargetMetas(command);
@@ -4163,14 +4160,16 @@ ${import_chalk.default.green("\u27A4")} Authentication Required`));
4163
4160
  const distPackageJson = workspace.readJson(`dist/pkgs/${library}/package.json`);
4164
4161
  const newDistPackageJson = {
4165
4162
  ...distPackageJson,
4166
- ...distPackageJson.dependencies ? {
4167
- dependencies: Object.fromEntries(
4168
- Object.entries(distPackageJson.dependencies).map(([key, value]) => [
4169
- key,
4170
- value.startsWith("^") ? value : `^${value}`
4171
- ])
4172
- )
4173
- } : {},
4163
+ // ...(distPackageJson.dependencies
4164
+ // ? {
4165
+ // dependencies: Object.fromEntries(
4166
+ // Object.entries(distPackageJson.dependencies).map(([key, value]) => [
4167
+ // key,
4168
+ // value.startsWith("^") ? value : `^${value}`,
4169
+ // ])
4170
+ // ),
4171
+ // }
4172
+ // : {}),
4174
4173
  version: nextVersion
4175
4174
  };
4176
4175
  workspace.writeJson(`dist/pkgs/${library}/package.json`, newDistPackageJson);
@@ -4672,6 +4671,18 @@ var WorkspaceScript = class {
4672
4671
  const cwdPath = process.cwd();
4673
4672
  const workspaceRoot = import_path5.default.join(cwdPath, dirname, repoName);
4674
4673
  const workspace = new WorkspaceExecutor({ workspaceRoot, repoName });
4674
+ await workspace.applyTemplate({
4675
+ basePath: ".",
4676
+ template: "workspaceRoot",
4677
+ dict: {
4678
+ repoName,
4679
+ RepoName: capitalize(repoName),
4680
+ appName,
4681
+ AppName: capitalize(appName),
4682
+ serveDomain: "localhost"
4683
+ }
4684
+ });
4685
+ const rootPackageJson = workspace.readJson("package.json");
4675
4686
  const dependencies = [
4676
4687
  "@akanjs/base",
4677
4688
  "@akanjs/cli",
@@ -4692,26 +4703,17 @@ var WorkspaceScript = class {
4692
4703
  const devDependencies = ["@akanjs/test", "@akanjs/devkit"];
4693
4704
  const latestPublishedVersionOfBase = await (0, import_latest_version2.default)("@akanjs/base");
4694
4705
  const packageJson = {
4695
- name: repoName,
4696
- version: "0.0.1",
4697
- description: `${repoName} workspace`,
4698
- dependencies: Object.fromEntries(dependencies.map((dependency) => [dependency, latestPublishedVersionOfBase])),
4699
- devDependencies: Object.fromEntries(
4700
- devDependencies.map((dependency) => [dependency, latestPublishedVersionOfBase])
4701
- )
4706
+ ...rootPackageJson,
4707
+ dependencies: {
4708
+ ...rootPackageJson.dependencies,
4709
+ ...Object.fromEntries(dependencies.map((dependency) => [dependency, latestPublishedVersionOfBase]))
4710
+ },
4711
+ devDependencies: {
4712
+ ...rootPackageJson.devDependencies,
4713
+ ...Object.fromEntries(devDependencies.map((dependency) => [dependency, latestPublishedVersionOfBase]))
4714
+ }
4702
4715
  };
4703
4716
  workspace.writeFile("package.json", packageJson);
4704
- await workspace.applyTemplate({
4705
- basePath: ".",
4706
- template: "workspaceRoot",
4707
- dict: {
4708
- repoName,
4709
- RepoName: capitalize(repoName),
4710
- appName,
4711
- AppName: capitalize(appName),
4712
- serveDomain: "localhost"
4713
- }
4714
- });
4715
4717
  workspace.log("Installing dependencies...");
4716
4718
  await workspace.spawn("pnpm", ["i"]);
4717
4719
  workspace.log("Initializing git repository and commit...");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "@akanjs/cli",
4
- "version": "0.0.72",
4
+ "version": "0.0.74",
5
5
  "bin": {
6
6
  "akan": "index.js"
7
7
  },
@@ -22,7 +22,6 @@
22
22
  "@langchain/core": "^0.3.56",
23
23
  "@langchain/openai": "^0.5.10",
24
24
  "@next/bundle-analyzer": "^15.1.3",
25
- "@nx/devkit": "^20.7.2",
26
25
  "@trapezedev/project": "^7.1.3",
27
26
  "@vitejs/plugin-react": "^4.4.1",
28
27
  "axios": "^1.7.9",
@@ -36,14 +35,14 @@
36
35
  "form-data": "^4.0.1",
37
36
  "js-yaml": "^4.1.0",
38
37
  "latest-version": "^9.0.0",
39
- "next-pwa": "^5.6.0",
38
+ "next-pwa": "5.6.0",
40
39
  "open": "^10.1.1",
41
40
  "ora": "^3.4.0",
42
41
  "pluralize": "^8.0.0",
43
42
  "qrcode": "^1.5.4",
44
43
  "reflect-metadata": "^0.2.2",
45
44
  "tunnel-ssh": "^5.2.0",
46
- "typescript": "^5.8.3",
45
+ "typescript": "5.8.3",
47
46
  "uuid": "^11.0.3",
48
47
  "vite": "^6.3.4",
49
48
  "vite-plugin-node-polyfills": "^0.23.0",
@@ -3,9 +3,6 @@ export type NextConfigFn = (phase: string, context?: any) => Promise<NextConfig>
3
3
  export type NextPlugin = (config: NextConfig) => NextConfig;
4
4
  export type NextPluginThatReturnsConfigFn = (config: NextConfig) => NextConfigFn;
5
5
  export declare const composePlugins: (...plugins: (NextPlugin | NextPluginThatReturnsConfigFn)[]) => ((baseConfig: NextConfig) => NextConfigFn);
6
- /**
7
- * @type { (config: import('@nx/next/plugins/with-nx').WithNxOptions) = import('@nx/next/plugins/with-nx').WithNxOptions }
8
- **/
9
6
  export declare const withBase: (appName: string, config: NextConfig, libs: string[], routes?: {
10
7
  basePath?: string;
11
8
  domains: {
@@ -1,7 +1,6 @@
1
1
  export * from "./baseDevEnv";
2
2
  export * from "./createTunnel";
3
3
  export * from "./getCredentials";
4
- export * from "./getDependencies";
5
4
  export * from "./uploadRelease";
6
5
  export * from "./getModelFileData";
7
6
  export * from "./getRelatedCnsts";
@@ -1,136 +1,3 @@
1
- /* eslint-disable */
2
- import { FlatCompat } from "@eslint/eslintrc";
3
- import js from "@eslint/js";
4
- import typescriptEslint from "@typescript-eslint/eslint-plugin";
5
- import tsParser from "@typescript-eslint/parser";
6
- import simpleImportSort from "eslint-plugin-simple-import-sort";
7
- import unusedImports from "eslint-plugin-unused-imports";
1
+ import { eslintConfig } from "@akanjs/lint";
8
2
 
9
- import akanjsLint from "@akanjs/lint";
10
-
11
- const compat = new FlatCompat({
12
- baseDirectory: __dirname,
13
- recommendedConfig: js.configs.recommended,
14
- allConfig: js.configs.all,
15
- });
16
-
17
- export default [
18
- {
19
- ignores: [
20
- "**/node_modules/**/*",
21
- "**/photoshop/**/*",
22
- "**/public/**/*",
23
- "**/ios/**/*",
24
- "**/android/**/*",
25
- "**/*.js",
26
- "**/*.jsx",
27
- "**/.next/**/*",
28
- "**/typechain-types/**/*",
29
- "**/script*.ts",
30
- "data/**/*",
31
- "dist/**/*",
32
- "releases/**/*",
33
- ],
34
- },
35
- ...compat.extends(
36
- "next",
37
- "next/core-web-vitals",
38
- "eslint:recommended",
39
- "plugin:@typescript-eslint/recommended-type-checked",
40
- "plugin:@typescript-eslint/strict-type-checked",
41
- "plugin:@typescript-eslint/stylistic-type-checked"
42
- // "plugin:tailwindcss/recommended"
43
- ),
44
- {
45
- plugins: {
46
- "@akanjs/lint": akanjsLint,
47
- "unused-imports": unusedImports,
48
- "simple-import-sort": simpleImportSort,
49
- "@typescript-eslint": typescriptEslint,
50
- },
51
-
52
- languageOptions: {
53
- parser: tsParser,
54
- ecmaVersion: 6,
55
- sourceType: "module",
56
-
57
- parserOptions: {
58
- project: true,
59
- projectService: true,
60
- },
61
- },
62
-
63
- settings: {
64
- "import/parsers": {
65
- "@typescript-eslint/parser": [".ts", ".tsx"],
66
- },
67
-
68
- "import/resolver": {
69
- typescript: "./tsconfig.json",
70
- },
71
- },
72
- },
73
- {
74
- files: ["**/*.ts", "**/*.tsx"],
75
- ignores: ["**/*.js", "**/*.jsx"],
76
-
77
- rules: {
78
- "no-console": "error",
79
- "@akanjs/lint/useClientByFile": "error",
80
- "@akanjs/lint/noImportClientFunctions": "error",
81
- "@akanjs/lint/nonScalarPropsRestricted": "error",
82
- "@akanjs/lint/noImportExternalLibrary": "error",
83
- "@typescript-eslint/no-inferrable-types": "off",
84
- "@typescript-eslint/restrict-template-expressions": "off",
85
- "@typescript-eslint/consistent-indexed-object-style": "off",
86
- "@typescript-eslint/no-extraneous-class": "off",
87
- "@typescript-eslint/no-unsafe-enum-comparison": "off",
88
- "@typescript-eslint/prefer-promise-reject-errors": "off",
89
-
90
- "@typescript-eslint/no-misused-promises": [
91
- "error",
92
- {
93
- checksVoidReturn: false,
94
- },
95
- ],
96
-
97
- "tailwindcss/no-custom-classname": "off",
98
- "react/display-name": "off",
99
- "react-hooks/exhaustive-deps": "off",
100
- "@next/next/no-html-link-for-pages": "off",
101
- "jsx-a11y/alt-text": [0],
102
- "unused-imports/no-unused-imports": "warn",
103
- "no-unused-vars": "off",
104
- "simple-import-sort/imports": "warn",
105
- "simple-import-sort/exports": "off",
106
- "import/first": "warn",
107
- "import/newline-after-import": "warn",
108
- },
109
- },
110
- {
111
- files: ["**/*.ts", "**/*.tsx"],
112
- rules: {},
113
- },
114
- ...compat.extends("plugin:@typescript-eslint/recommended").map((config) => ({
115
- ...config,
116
- files: ["**/*.ts", "**/*.tsx"],
117
- })),
118
- // ...fixupConfigRules(compat.extends("plugin:import/recommended")).map((config) => ({
119
- // ...config,
120
- // files: ["**/*.ts", "**/*.tsx"],
121
- // })),
122
- {
123
- files: ["**/*.ts", "**/*.tsx"],
124
-
125
- rules: {
126
- "import/no-duplicates": "warn",
127
- "import/no-unresolved": "off",
128
- "import/named": "off",
129
- "import/namespace": "off",
130
- "@typescript-eslint/no-explicit-any": "off",
131
- "@typescript-eslint/no-unused-vars": "off",
132
- "@typescript-eslint/no-misused-spread": "off",
133
- "react-hooks/rules-of-hooks": "off",
134
- },
135
- },
136
- ];
3
+ export default eslintConfig;
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "<%= repoName %>",
3
+ "description": "<%= repoName %> workspace"
4
+ "version": "0.0.1",
5
+ "dependencies": {
6
+ "next": "15.3.2",
7
+ "tailwindcss": "^4.1.7",
8
+ "daisyui": "^5.0.35"
9
+ },
10
+ "devDependencies": {
11
+ "eslint": "^9.19.0",
12
+ "jest": "^29.7.0",
13
+ "jiti": "^2.4.2",
14
+ "prettier": "^3.5.3"
15
+ }
16
+ }
@@ -1,4 +0,0 @@
1
- export declare const getDependencies: (projectName: string) => Promise<{
2
- libDeps: string[];
3
- npmDeps: string[];
4
- }>;