@tinycloud/cli 0.7.0-beta.15 → 0.7.0-beta.17

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.js CHANGED
@@ -37854,7 +37854,7 @@ var DatabaseHandle = class {
37854
37854
  var SQLAction = {
37855
37855
  READ: "tinycloud.sql/read",
37856
37856
  WRITE: "tinycloud.sql/write",
37857
- DDL: "tinycloud.sql/ddl",
37857
+ SCHEMA: "tinycloud.sql/schema",
37858
37858
  ADMIN: "tinycloud.sql/admin",
37859
37859
  SELECT: "tinycloud.sql/select",
37860
37860
  INSERT: "tinycloud.sql/insert",
@@ -37972,7 +37972,7 @@ var SQLService = class extends BaseService {
37972
37972
  const actions = [
37973
37973
  this.actionForSql(sql, SQLAction.WRITE),
37974
37974
  ...(options?.schema ?? []).map(
37975
- (statement) => this.actionForSql(statement, SQLAction.DDL)
37975
+ (statement) => this.actionForSql(statement, SQLAction.SCHEMA)
37976
37976
  )
37977
37977
  ];
37978
37978
  const response = await this.invokeSQL(
@@ -38152,7 +38152,7 @@ var SQLService = class extends BaseService {
38152
38152
  actionForSql(sql, fallback) {
38153
38153
  const token = firstSqlToken(sql);
38154
38154
  if (token === "pragma") return SQLAction.ADMIN;
38155
- if (token !== void 0 && DDL_TOKENS.has(token)) return SQLAction.DDL;
38155
+ if (token !== void 0 && DDL_TOKENS.has(token)) return SQLAction.SCHEMA;
38156
38156
  return fallback;
38157
38157
  }
38158
38158
  actionsForSqlBatch(statements) {
@@ -41761,7 +41761,7 @@ var DEFAULT_ADMIN_ENTRIES = [
41761
41761
  service: "tinycloud.sql",
41762
41762
  space: DEFAULT_MANIFEST_SPACE,
41763
41763
  path: "/",
41764
- actions: ["read", "write", "ddl"]
41764
+ actions: ["read", "write", "schema"]
41765
41765
  }
41766
41766
  ];
41767
41767
  var DEFAULT_ALL_ENTRIES = [
@@ -41775,7 +41775,7 @@ var DEFAULT_ALL_ENTRIES = [
41775
41775
  service: "tinycloud.sql",
41776
41776
  space: DEFAULT_MANIFEST_SPACE,
41777
41777
  path: "/",
41778
- actions: ["read", "write", "ddl"]
41778
+ actions: ["read", "write", "schema"]
41779
41779
  },
41780
41780
  {
41781
41781
  service: "tinycloud.duckdb",
@@ -43532,7 +43532,7 @@ async function confirmPermissionRequest(permissions) {
43532
43532
  function isDangerousPermission(permission) {
43533
43533
  if (permission.path === "" || permission.path === "/") return true;
43534
43534
  return permission.actions.some(
43535
- (action) => action.includes("*") || action.endsWith("/write") || action.endsWith("/admin") || action.endsWith("/ddl") || action.endsWith("/del")
43535
+ (action) => action.includes("*") || action.endsWith("/write") || action.endsWith("/admin") || action.endsWith("/schema") || action.endsWith("/del")
43536
43536
  );
43537
43537
  }
43538
43538
  function parseExpiryOption(raw) {