Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@magicspace/core

Package Overview
Dependencies
Maintainers
5
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@magicspace/core - npm Package Compare versions

Comparing version 0.2.8 to 0.2.9

2

bld/library/project/composable-module.d.ts
import { File } from '../file';
import { Context } from './context';
export declare type ComposableModule = File.Composable<unknown, unknown> | File.Composable<unknown, unknown>[] | undefined | ComposableModuleFunction;
export declare type ComposableModuleDefault = File.Composable<unknown, unknown> | File.Composable<unknown, unknown>[] | undefined | ComposableModuleFunction;
export declare type ComposableModuleFunction = (options: Magicspace.TemplateOptions, context: Context) => File.Composable<unknown, unknown> | File.Composable<unknown, unknown>[] | undefined extends infer TReturn ? Promise<TReturn> | TReturn : never;

@@ -6,2 +6,3 @@ "use strict";

const Path = tslib_1.__importStar(require("path"));
const tslib_2 = require("tslib");
const _constants_1 = require("../@constants");

@@ -107,5 +108,8 @@ const _git_1 = require("../@git");

for (let { path: composableModulePath, base: baseDir } of fileEntries) {
let moduleDefault = tslib_2.__importDefault(
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
let module = require(composableModulePath);
let composables = typeof module === 'function' ? await module(options, context) : module;
require(composableModulePath));
let composables = typeof moduleDefault === 'function'
? await moduleDefault(options, context)
: moduleDefault;
if (!composables) {

@@ -112,0 +116,0 @@ continue;

{
"name": "@magicspace/core",
"version": "0.2.8",
"version": "0.2.9",
"publishConfig": {

@@ -36,3 +36,3 @@ "access": "public"

},
"gitHead": "58f2dd6b063cbc95d78435195ce1fe06d826d8b9"
"gitHead": "f57e414304b85557119f7fae97cc13a18b205540"
}

@@ -5,3 +5,3 @@ import {File} from '../file';

export type ComposableModule =
export type ComposableModuleDefault =
| File.Composable<unknown, unknown>

@@ -8,0 +8,0 @@ | File.Composable<unknown, unknown>[]

import * as Path from 'path';
import {__importDefault} from 'tslib';
import {TEMP_MAGIC_REPOSITORY_DIR} from '../@constants';

@@ -9,3 +11,3 @@ import {ProjectGit, Rename, TempGit} from '../@git';

import {ComposableModule} from './composable-module';
import {ComposableModuleDefault} from './composable-module';
import {Context} from './context';

@@ -175,7 +177,11 @@

for (let {path: composableModulePath, base: baseDir} of fileEntries) {
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
let module: ComposableModule = require(composableModulePath);
let moduleDefault = __importDefault(
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
require(composableModulePath),
) as ComposableModuleDefault;
let composables =
typeof module === 'function' ? await module(options, context) : module;
typeof moduleDefault === 'function'
? await moduleDefault(options, context)
: moduleDefault;

@@ -182,0 +188,0 @@ if (!composables) {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc