commit
1ff6b4a3ae
44598 changed files with 3593069 additions and 0 deletions
@ -0,0 +1,111 @@ |
|||||
|
from typing import Dict, List, Any, Optional |
||||
|
|
||||
|
|
||||
|
def convert_node_to_g6_v5(neo4j_node: Dict[str, Any]) -> Dict[str, Any]: |
||||
|
""" |
||||
|
将 Neo4j 节点(含 id 和 props)转换为 G6 v5 节点格式。 |
||||
|
|
||||
|
:param neo4j_node: 来自 Neo4jUtil 的节点字典,必须包含 'id' 字段 |
||||
|
:return: G6 v5 节点对象 |
||||
|
""" |
||||
|
node_id = neo4j_node.get("id") |
||||
|
if node_id is None: |
||||
|
raise ValueError("节点必须包含 'id' 字段") |
||||
|
|
||||
|
# 构建 data:排除 'id',保留其他属性 |
||||
|
data = {k: v for k, v in neo4j_node.items() if k != "id"} |
||||
|
|
||||
|
# 确保有显示用的 name 或 label(G6 默认使用 data.name) |
||||
|
if "name" not in data and "label" not in data: |
||||
|
data["name"] = str(node_id) |
||||
|
|
||||
|
g6_node = { |
||||
|
"id": node_id, |
||||
|
"data": data, |
||||
|
# 可选字段(前端可覆盖): |
||||
|
# "type": "circle", |
||||
|
# "style": {"size": 32, "fill": "violet"}, |
||||
|
"states": [], |
||||
|
"combo": None |
||||
|
} |
||||
|
return g6_node |
||||
|
|
||||
|
|
||||
|
def build_g6_graph_data( |
||||
|
neo4j_util: 'Neo4jUtil', |
||||
|
node_label: str, |
||||
|
rel_type: Optional[str] = None |
||||
|
) -> Dict[str, List[Dict[str, Any]]]: |
||||
|
""" |
||||
|
构建 G6 v5 兼容的图数据结构(nodes + edges)。 |
||||
|
|
||||
|
:param neo4j_util: 已连接的 Neo4jUtil 实例 |
||||
|
:param node_label: 中心节点标签(用于获取初始节点集) |
||||
|
:param rel_type: 关系类型(可选,若为 None 则获取所有关系) |
||||
|
:return: {'nodes': [...], 'edges': [...]} |
||||
|
""" |
||||
|
# 1. 获取中心节点(指定标签的所有节点) |
||||
|
center_nodes = neo4j_util.find_all_nodes(node_label) |
||||
|
|
||||
|
# 2. 获取所有相关关系(可按类型过滤) |
||||
|
relationships = neo4j_util.find_all_relationships(rel_type=rel_type) |
||||
|
|
||||
|
# 3. 使用字典去重节点(key: elementId) |
||||
|
g6_node_map: Dict[str, Dict[str, Any]] = {} |
||||
|
|
||||
|
# 添加中心节点 |
||||
|
for node in center_nodes: |
||||
|
node_id = node.get("id") |
||||
|
if node_id: |
||||
|
g6_node_map[node_id] = convert_node_to_g6_v5(node) |
||||
|
|
||||
|
# 4. 处理关系,提取 source/target 节点并构建边 |
||||
|
g6_edges: List[Dict[str, Any]] = [] |
||||
|
|
||||
|
for rel in relationships: |
||||
|
source_node = rel.get("source") |
||||
|
target_node = rel.get("target") |
||||
|
|
||||
|
if not source_node or not target_node: |
||||
|
continue |
||||
|
|
||||
|
source_id = source_node.get("id") |
||||
|
target_id = target_node.get("id") |
||||
|
|
||||
|
if not source_id or not target_id: |
||||
|
continue |
||||
|
|
||||
|
# 自动加入 source 和 target 节点(去重) |
||||
|
g6_node_map[source_id] = convert_node_to_g6_v5(source_node) |
||||
|
g6_node_map[target_id] = convert_node_to_g6_v5(target_node) |
||||
|
|
||||
|
# 构建 G6 边对象 |
||||
|
edge_data = {} |
||||
|
|
||||
|
# 关系类型 |
||||
|
rel_type_str = rel.get("type") |
||||
|
if rel_type_str: |
||||
|
edge_data["relationship"] = rel_type_str |
||||
|
|
||||
|
# 合并关系属性 |
||||
|
rel_props = rel.get("relProps") or {} |
||||
|
edge_data.update(rel_props) |
||||
|
|
||||
|
g6_edge = { |
||||
|
"source": source_id, |
||||
|
"target": target_id, |
||||
|
"type": "line", # G6 默认边类型 |
||||
|
"data": edge_data, |
||||
|
# "style": {}, # 可由前端统一配置 |
||||
|
"states": [] |
||||
|
} |
||||
|
g6_edges.append(g6_edge) |
||||
|
|
||||
|
# 5. 组装结果 |
||||
|
result = { |
||||
|
"nodes": list(g6_node_map.values()), |
||||
|
"edges": g6_edges |
||||
|
} |
||||
|
return result |
||||
|
|
||||
|
|
||||
@ -0,0 +1,92 @@ |
|||||
|
# test_neo4j.py |
||||
|
from util.neo4j_utils import neo4j_client |
||||
|
|
||||
|
# 插入一个标签为 "Disease" 的节点,属性包括 name 和 icd10 |
||||
|
# node_id = neo4j_client.insert_node(label="Disease", properties={"name": "糖尿病", "icd10": "E11.9"}) |
||||
|
# print(f"创建的新节点 ID: {node_id}") |
||||
|
# |
||||
|
# # 删除所有标签为 "Disease" 的节点及其关系 |
||||
|
# neo4j_client.delete_all_nodes_by_label(label="Disease") |
||||
|
# print("已删除所有 'Disease' 标签的节点") |
||||
|
# |
||||
|
# 删除所有属性 name 为 "糖尿病" 的 Disease 节点 |
||||
|
# neo4j_client.delete_nodes_by_condition(label="Disease", conditions={"name": "糖尿病", "icd10": "E11.9"}) |
||||
|
# print("已删除符合条件的节点") |
||||
|
# |
||||
|
# # 查询所有标签为 "Disease" 的节点 |
||||
|
# nodes = neo4j_client.find_all_nodes(label="Disease") |
||||
|
# for node in nodes: |
||||
|
# print(node) |
||||
|
# |
||||
|
# # 查找所有 name 为 "糖尿病" 的 Disease 节点 |
||||
|
# nodes = neo4j_client.find_nodes_with_element_id(label="Disease", properties={"name": "糖尿病"}) |
||||
|
# for node in nodes: |
||||
|
# print(node) |
||||
|
# |
||||
|
# # 更新 name 为 "糖尿病" 的 Disease 节点的 icd10 属性 |
||||
|
# neo4j_client.update_node_by_properties(label="Disease", where={"name": "糖尿病"}, updates={"icd10": "E11.8"}) |
||||
|
# print("节点已更新") |
||||
|
# |
||||
|
# 创建一个从 "Disease" 节点到 "Drug" 节点的关系,类型为 TREATS |
||||
|
# neo4j_client.create_relationship( |
||||
|
# source_label="Disease", |
||||
|
# source_props={"name": "糖尿病"}, |
||||
|
# target_label="Drug", |
||||
|
# target_props={"name": "二甲双胍"}, |
||||
|
# rel_type="TREATS" |
||||
|
# ) |
||||
|
# |
||||
|
# # 查询所有类型为 "TREATS" 的关系 |
||||
|
# relationships = neo4j_client.find_all_relationships(rel_type="TREATS") |
||||
|
# for relationship in relationships: |
||||
|
# print(relationship) |
||||
|
# |
||||
|
# # 查询所有从 "Disease" 到 "Drug" 的 "TREATS" 类型关系 |
||||
|
# relationships = neo4j_client.find_relationships_by_condition( |
||||
|
# source_label="Disease", |
||||
|
# source_props={"name": "糖尿病"}, |
||||
|
# target_label="Drug", |
||||
|
# target_props={"name": "二甲双胍"}, |
||||
|
# rel_type="TREATS" |
||||
|
# ) |
||||
|
# for relationship in relationships: |
||||
|
# print(relationship) |
||||
|
|
||||
|
# # 删除所有 "Disease" 节点的关系 |
||||
|
# neo4j_client.delete_all_relationships_by_node_label(node_label="Disease") |
||||
|
# print("已删除所有 'Disease' 节点的关系") |
||||
|
# |
||||
|
# 删除所有 name 为 "糖尿病" 的 Disease 节点的关系 |
||||
|
# neo4j_client.delete_all_relationships_by_node_props(label="Disease", properties={"name": "糖尿病"}) |
||||
|
# print("已删除符合条件的节点的所有关系") |
||||
|
|
||||
|
# # 删除所有从 "Disease" 到 "Drug" 的 "TREATS" 类型关系 |
||||
|
# neo4j_client.delete_relationships_advanced( |
||||
|
# source_label="Disease", |
||||
|
# source_props={"name": "糖尿病"}, |
||||
|
# target_label="Drug", |
||||
|
# target_props={"name": "二甲双胍"}, |
||||
|
# rel_type="TREATS" |
||||
|
# ) |
||||
|
# print("高级关系删除完成") |
||||
|
|
||||
|
# 更新从 "Disease" 到 "Drug" 的 "TREATS" 类型关系的某些属性 |
||||
|
# neo4j_client.update_relationship( |
||||
|
# source_label="Disease", |
||||
|
# source_props={"name": "糖尿病"}, |
||||
|
# target_label="Drug", |
||||
|
# target_props={"name": "二甲双胍"}, |
||||
|
# rel_type="TREATS", |
||||
|
# new_rel_properties={"effectiveness": "high"} |
||||
|
# ) |
||||
|
# print("关系属性已更新") |
||||
|
# neighbors = neo4j_client.find_neighbors_with_relationships( |
||||
|
# node_label="Disease", |
||||
|
# node_properties={"name": "糖尿病"}, |
||||
|
# direction="both" # 或 "out"/"in" |
||||
|
# ) |
||||
|
# |
||||
|
# for item in neighbors: |
||||
|
# print(f"关系: {item['relationship']['type']}") |
||||
|
# print(f"目标节点: {item['target']['label']} - {item['target']}") |
||||
|
# print("---") |
||||
@ -0,0 +1,156 @@ |
|||||
|
import robyn |
||||
|
from robyn import Robyn, jsonify, Response |
||||
|
from typing import Optional, List, Any, Dict |
||||
|
from util.neo4j_utils import Neo4jUtil |
||||
|
from util.neo4j_utils import neo4j_client |
||||
|
def convert_node_to_g6_v5(neo4j_node: dict) -> dict: |
||||
|
node_id = neo4j_node.get("id") |
||||
|
if node_id is None: |
||||
|
raise ValueError("节点必须包含 'id' 字段") |
||||
|
|
||||
|
data = {k: v for k, v in neo4j_node.items() if k != "id"} |
||||
|
if "name" not in data and "label" not in data: |
||||
|
data["name"] = str(node_id) |
||||
|
|
||||
|
return { |
||||
|
"id": node_id, |
||||
|
"data": data, |
||||
|
"states": [], |
||||
|
"combo": None |
||||
|
} |
||||
|
|
||||
|
|
||||
|
def build_g6_graph_data_from_results( |
||||
|
nodes: List[Dict[str, Any]], |
||||
|
relationships: List[Dict[str, Any]] |
||||
|
) -> dict: |
||||
|
""" |
||||
|
通用方法:根据节点列表和关系列表构建 G6 v5 图数据 |
||||
|
|
||||
|
Args: |
||||
|
nodes: 节点列表,每个节点需含 "id" |
||||
|
relationships: 关系列表,每个关系需含: |
||||
|
- source: {"id": ..., ...} |
||||
|
- target: {"id": ..., ...} |
||||
|
- relationship: {"type": str, "properties": dict} 或直接扁平化字段 |
||||
|
|
||||
|
Returns: |
||||
|
{"nodes": [...], "edges": [...]} |
||||
|
""" |
||||
|
g6_node_map = {} |
||||
|
|
||||
|
# 处理显式传入的节点 |
||||
|
for node in nodes: |
||||
|
node_id = node.get("id") |
||||
|
if node_id: |
||||
|
g6_node_map[node_id] = convert_node_to_g6_v5(node) |
||||
|
|
||||
|
g6_edges = [] |
||||
|
for rel in relationships: |
||||
|
source_node = rel.get("source") |
||||
|
target_node = rel.get("target") |
||||
|
if not source_node or not target_node: |
||||
|
continue |
||||
|
|
||||
|
source_id = source_node.get("id") |
||||
|
target_id = target_node.get("id") |
||||
|
if not source_id or not target_id: |
||||
|
continue |
||||
|
|
||||
|
# 确保 source/target 节点也加入图中(即使未在 nodes 中显式提供) |
||||
|
if source_id not in g6_node_map: |
||||
|
g6_node_map[source_id] = convert_node_to_g6_v5(source_node) |
||||
|
if target_id not in g6_node_map: |
||||
|
g6_node_map[target_id] = convert_node_to_g6_v5(target_node) |
||||
|
|
||||
|
# 构建 edge data |
||||
|
edge_data = {} |
||||
|
rel_type_str = rel.get("type") or rel.get("relationship") # 兼容不同结构 |
||||
|
if rel_type_str: |
||||
|
edge_data["relationship"] = rel_type_str |
||||
|
|
||||
|
# 尝试从 relProps 或 properties 或顶层提取关系属性 |
||||
|
rel_props = ( |
||||
|
rel.get("relProps") or |
||||
|
rel.get("properties") or |
||||
|
{k: v for k, v in rel.items() if k not in ("source", "target", "type", "relationship")} |
||||
|
) |
||||
|
if isinstance(rel_props, dict): |
||||
|
edge_data.update(rel_props) |
||||
|
|
||||
|
g6_edge = { |
||||
|
"source": source_id, |
||||
|
"target": target_id, |
||||
|
"type": "line", |
||||
|
"data": edge_data, |
||||
|
"states": [] |
||||
|
} |
||||
|
g6_edges.append(g6_edge) |
||||
|
|
||||
|
return { |
||||
|
"nodes": list(g6_node_map.values()), |
||||
|
"edges": g6_edges |
||||
|
} |
||||
|
def build_g6_subgraph_by_props( |
||||
|
neo4j_util: Neo4jUtil, |
||||
|
node_label: str, |
||||
|
node_properties: Dict[str, Any], |
||||
|
direction: str = "both", |
||||
|
rel_type: Optional[str] = None |
||||
|
) -> dict: |
||||
|
neighbor_list = neo4j_util.find_neighbors_with_relationships( |
||||
|
node_label=node_label, |
||||
|
node_properties=node_properties, |
||||
|
direction=direction, |
||||
|
rel_type=rel_type |
||||
|
) |
||||
|
|
||||
|
# 提取所有唯一节点 |
||||
|
node_dict = {} |
||||
|
for item in neighbor_list: |
||||
|
for key in ["source", "target"]: |
||||
|
n = item[key] |
||||
|
nid = n.get("id") |
||||
|
if nid and nid not in node_dict: |
||||
|
node_dict[nid] = n |
||||
|
|
||||
|
# 如果没找到关系,但中心节点存在,也要包含它 |
||||
|
if not neighbor_list: |
||||
|
center_nodes = neo4j_util.find_nodes_with_element_id(node_label, node_properties) |
||||
|
if center_nodes: |
||||
|
n = center_nodes[0] |
||||
|
node_dict[n["id"]] = n |
||||
|
|
||||
|
nodes = list(node_dict.values()) |
||||
|
relationships = neighbor_list # 结构已兼容 |
||||
|
|
||||
|
return build_g6_graph_data_from_results(nodes, relationships) |
||||
|
# ====================== |
||||
|
# Robyn App |
||||
|
# ====================== |
||||
|
app = Robyn(__file__) |
||||
|
|
||||
|
|
||||
|
@app.get("/getData") |
||||
|
def get_data(): |
||||
|
try: |
||||
|
graph_data = build_g6_subgraph_by_props( |
||||
|
neo4j_client, |
||||
|
node_label="Disease", |
||||
|
node_properties={"name": "偏头痛"}, |
||||
|
direction="both", |
||||
|
rel_type=None |
||||
|
) |
||||
|
return Response( |
||||
|
status_code=200, |
||||
|
description=jsonify(graph_data), |
||||
|
headers={"Content-Type": "text/plain; charset=utf-8"} |
||||
|
) |
||||
|
except Exception as e: |
||||
|
return jsonify({"error": str(e)}), 500 |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
if __name__ == "__main__": |
||||
|
app.start(host="0.0.0.0", port=8088) |
||||
@ -0,0 +1,448 @@ |
|||||
|
# neo4j_util.py |
||||
|
import logging |
||||
|
from typing import Dict, List, Optional, Any |
||||
|
from neo4j import GraphDatabase, Driver |
||||
|
|
||||
|
logger = logging.getLogger(__name__) |
||||
|
|
||||
|
# ==================== 配置区(可按需改为从环境变量读取)==================== |
||||
|
NEO4J_URI = "bolt://localhost:7687" |
||||
|
NEO4J_USERNAME = "neo4j" |
||||
|
NEO4J_PASSWORD = "12345678" # 建议后续改为 os.getenv("NEO4J_PASSWORD") |
||||
|
NEO4J_DATABASE = "neo4j" |
||||
|
class Neo4jUtil: |
||||
|
def __init__(self, uri: str, username: str, password: str, database: str = "neo4j"): |
||||
|
self.uri = uri |
||||
|
self.username = username |
||||
|
self.password = password |
||||
|
self.database = database |
||||
|
self.driver: Optional[Driver] = None |
||||
|
|
||||
|
def connect(self) -> bool: |
||||
|
"""初始化连接""" |
||||
|
try: |
||||
|
self.driver = GraphDatabase.driver(self.uri, auth=(self.username, self.password)) |
||||
|
self.driver.verify_connectivity() |
||||
|
logger.info(f"Neo4jUtil 初始化完成,连接地址: {self.uri}, 数据库: {self.database}") |
||||
|
return True |
||||
|
except Exception as e: |
||||
|
logger.error(f"Neo4j 连接失败: {e}") |
||||
|
return False |
||||
|
|
||||
|
def close(self): |
||||
|
"""关闭驱动""" |
||||
|
if self.driver: |
||||
|
self.driver.close() |
||||
|
logger.info("Neo4jUtil 驱动已关闭") |
||||
|
|
||||
|
# ==================== 核心执行方法 ==================== |
||||
|
|
||||
|
def execute_write(self, cypher: str, params: Optional[Dict[str, Any]] = None): |
||||
|
"""执行写操作""" |
||||
|
if not self.driver: |
||||
|
raise RuntimeError("Neo4j 驱动未初始化") |
||||
|
params = params or {} |
||||
|
with self.driver.session(database=self.database) as session: |
||||
|
session.execute_write( |
||||
|
lambda tx: tx.run(cypher, parameters=params).consume() |
||||
|
) |
||||
|
logger.debug(f"执行写操作: {cypher}") |
||||
|
|
||||
|
def execute_read(self, cypher: str, params: Optional[Dict[str, Any]] = None) -> List[Dict[str, Any]]: |
||||
|
"""执行读操作,返回列表字典""" |
||||
|
if not self.driver: |
||||
|
raise RuntimeError("Neo4j 驱动未初始化") |
||||
|
params = params or {} |
||||
|
with self.driver.session(database=self.database) as session: |
||||
|
result = session.execute_read( |
||||
|
lambda tx: [record.data() for record in tx.run(cypher, parameters=params)] |
||||
|
) |
||||
|
return result |
||||
|
|
||||
|
def execute_write_and_return(self, cypher: str, params: Optional[Dict[str, Any]] = None) -> List[Dict[str, Any]]: |
||||
|
"""执行写操作并返回结果(如 CREATE ... RETURN)""" |
||||
|
if not self.driver: |
||||
|
raise RuntimeError("Neo4j 驱动未初始化") |
||||
|
params = params or {} |
||||
|
with self.driver.session(database=self.database) as session: |
||||
|
result = session.execute_write( |
||||
|
lambda tx: [record.data() for record in tx.run(cypher, parameters=params)] |
||||
|
) |
||||
|
return result |
||||
|
|
||||
|
# ==================== 节点操作 ==================== |
||||
|
|
||||
|
def insert_node(self, label: str, properties: Dict[str, Any]) -> str: |
||||
|
""" |
||||
|
创建节点,返回 elementId |
||||
|
""" |
||||
|
cypher = f"CREATE (n:`{label}` $props) RETURN elementId(n) AS id" |
||||
|
result = self.execute_write_and_return(cypher, {"props": properties}) |
||||
|
return result[0]["id"] |
||||
|
|
||||
|
def delete_all_nodes_by_label(self, label: str): |
||||
|
"""删除指定标签的所有节点(含关系)""" |
||||
|
cypher = f"MATCH (n:`{label}`) DETACH DELETE n" |
||||
|
self.execute_write(cypher) |
||||
|
|
||||
|
def delete_nodes_by_condition(self, label: str, conditions: Dict[str, Any]): |
||||
|
"""按属性条件删除节点""" |
||||
|
if not conditions: |
||||
|
raise ValueError("删除条件不能为空,防止误删全表!") |
||||
|
where_clause = " AND ".join([f"n.`{k}` = $cond_{k}" for k in conditions]) |
||||
|
params = {f"cond_{k}": v for k, v in conditions.items()} |
||||
|
cypher = f"MATCH (n:`{label}`) WHERE {where_clause} DETACH DELETE n" |
||||
|
self.execute_write(cypher, params) |
||||
|
|
||||
|
def find_all_nodes(self, label: str) -> List[Dict[str, Any]]: |
||||
|
"""查询所有节点,包含 elementId""" |
||||
|
cypher = f"MATCH (n:`{label}`) RETURN elementId(n) AS id, n{{.*}} AS props" |
||||
|
raw = self.execute_read(cypher) |
||||
|
return [self._merge_id_and_props(row) for row in raw] |
||||
|
|
||||
|
def find_nodes_with_element_id(self, label: str, properties: Optional[Dict[str, Any]] = None) -> List[Dict[str, Any]]: |
||||
|
"""按属性查询节点""" |
||||
|
cypher = f"MATCH (n:`{label}`)" |
||||
|
params = {} |
||||
|
if properties: |
||||
|
where_clause = " AND ".join([f"n.`{k}` = $prop_{k}" for k in properties]) |
||||
|
params = {f"prop_{k}": v for k, v in properties.items()} |
||||
|
cypher += f" WHERE {where_clause}" |
||||
|
cypher += " RETURN elementId(n) AS id, n{.*} AS props" |
||||
|
raw = self.execute_read(cypher, params) |
||||
|
return [self._merge_id_and_props(row) for row in raw] |
||||
|
|
||||
|
def update_node_by_properties(self, label: str, where: Dict[str, Any], updates: Dict[str, Any]): |
||||
|
"""按条件更新节点""" |
||||
|
if not where: |
||||
|
raise ValueError("WHERE 条件不能为空!") |
||||
|
if not updates: |
||||
|
raise ValueError("更新内容不能为空!") |
||||
|
|
||||
|
where_clause = " AND ".join([f"n.`{k}` = $where_{k}" for k in where]) |
||||
|
set_clause = ", ".join([f"n.`{k}` = $update_{k}" for k in updates]) |
||||
|
|
||||
|
params = {f"where_{k}": v for k, v in where.items()} |
||||
|
params.update({f"update_{k}": v for k, v in updates.items()}) |
||||
|
|
||||
|
cypher = f"MATCH (n:`{label}`) WHERE {where_clause} SET {set_clause}" |
||||
|
self.execute_write(cypher, params) |
||||
|
|
||||
|
# ==================== 关系操作 ==================== |
||||
|
|
||||
|
def create_relationship( |
||||
|
self, |
||||
|
source_label: str, |
||||
|
source_props: Dict[str, Any], |
||||
|
target_label: str, |
||||
|
target_props: Dict[str, Any], |
||||
|
rel_type: str, |
||||
|
rel_properties: Optional[Dict[str, Any]] = None, |
||||
|
): |
||||
|
"""创建关系(要求两端节点存在)""" |
||||
|
if not source_props or not target_props: |
||||
|
raise ValueError("源或目标节点条件不能为空") |
||||
|
|
||||
|
match_a = self._build_match_clause("a", source_label, source_props, "src") |
||||
|
match_b = self._build_match_clause("b", target_label, target_props, "tgt") |
||||
|
params = {**match_a["params"], **match_b["params"]} |
||||
|
|
||||
|
if rel_properties: |
||||
|
rel_part = f"`{rel_type}` $rel_props" |
||||
|
params["rel_props"] = rel_properties |
||||
|
else: |
||||
|
rel_part = f"`{rel_type}`" |
||||
|
|
||||
|
cypher = f""" |
||||
|
MATCH {match_a['clause']}, {match_b['clause']} |
||||
|
CREATE (a)-[r:{rel_part}]->(b) |
||||
|
""" |
||||
|
self.execute_write(cypher, params) |
||||
|
|
||||
|
def find_all_relationships(self, rel_type: Optional[str] = None) -> List[Dict[str, Any]]: |
||||
|
"""查询所有关系(可选类型)""" |
||||
|
r_label = f":`{rel_type}`" if rel_type else "" |
||||
|
cypher = f""" |
||||
|
MATCH (a)-[r{r_label}]->(b) |
||||
|
RETURN |
||||
|
elementId(r) AS relId, |
||||
|
type(r) AS type, |
||||
|
r{{.*}} AS relProps, |
||||
|
elementId(a) AS sourceId, |
||||
|
head(labels(a)) AS sourceLabel, |
||||
|
a{{.*}} AS sourceProps, |
||||
|
elementId(b) AS targetId, |
||||
|
head(labels(b)) AS targetLabel, |
||||
|
b{{.*}} AS targetProps |
||||
|
""" |
||||
|
raw = self.execute_read(cypher) |
||||
|
return [self._enrich_relationship(row) for row in raw] |
||||
|
|
||||
|
def find_relationships_by_condition( |
||||
|
self, |
||||
|
source_label: Optional[str] = None, |
||||
|
source_props: Optional[Dict[str, Any]] = None, |
||||
|
target_label: Optional[str] = None, |
||||
|
target_props: Optional[Dict[str, Any]] = None, |
||||
|
rel_type: Optional[str] = None, |
||||
|
rel_properties: Optional[Dict[str, Any]] = None, |
||||
|
) -> List[Dict[str, Any]]: |
||||
|
"""按复杂条件查询关系""" |
||||
|
a_label = f":`{source_label}`" if source_label else "" |
||||
|
b_label = f":`{target_label}`" if target_label else "" |
||||
|
r_label = f":`{rel_type}`" if rel_type else "" |
||||
|
|
||||
|
match = f"MATCH (a{a_label})-[r{r_label}]->(b{b_label})" |
||||
|
|
||||
|
where_parts = [] |
||||
|
params = {} |
||||
|
|
||||
|
if source_props: |
||||
|
part, p = self._build_where_conditions("a", source_props, "src") |
||||
|
where_parts.append(part) |
||||
|
params.update(p) |
||||
|
if target_props: |
||||
|
part, p = self._build_where_conditions("b", target_props, "tgt") |
||||
|
where_parts.append(part) |
||||
|
params.update(p) |
||||
|
if rel_properties: |
||||
|
part, p = self._build_where_conditions("r", rel_properties, "rel") |
||||
|
where_parts.append(part) |
||||
|
params.update(p) |
||||
|
|
||||
|
cypher = match |
||||
|
if where_parts: |
||||
|
cypher += " WHERE " + " AND ".join(where_parts) |
||||
|
|
||||
|
cypher += """ |
||||
|
RETURN |
||||
|
elementId(r) AS relId, |
||||
|
type(r) AS type, |
||||
|
r{.*} AS relProps, |
||||
|
elementId(a) AS sourceId, |
||||
|
head(labels(a)) AS sourceLabel, |
||||
|
a{.*} AS sourceProps, |
||||
|
elementId(b) AS targetId, |
||||
|
head(labels(b)) AS targetLabel, |
||||
|
b{.*} AS targetProps |
||||
|
""" |
||||
|
raw = self.execute_read(cypher, params) |
||||
|
return [self._enrich_relationship(row) for row in raw] |
||||
|
|
||||
|
def find_neighbors_with_relationships( |
||||
|
self, |
||||
|
node_label: str, |
||||
|
node_properties: Dict[str, Any], |
||||
|
direction: str = "both", # 可选: "out", "in", "both" |
||||
|
rel_type: Optional[str] = None, |
||||
|
) -> List[Dict[str, Any]]: |
||||
|
""" |
||||
|
查询指定节点的所有邻居节点及其关系(包括入边、出边或双向) |
||||
|
|
||||
|
Args: |
||||
|
node_label (str): 节点标签 |
||||
|
node_properties (Dict[str, Any]): 节点匹配属性(必须能唯一或有效定位节点) |
||||
|
direction (str): 关系方向,"out" 表示 (n)-[r]->(m),"in" 表示 (n)<-[r]-(m),"both" 表示无向 |
||||
|
rel_type (Optional[str]): 可选的关系类型过滤 |
||||
|
|
||||
|
Returns: |
||||
|
List[Dict]: 每项包含 source(原节点)、target(邻居)、relationship 信息 |
||||
|
""" |
||||
|
if not node_properties: |
||||
|
raise ValueError("node_properties 不能为空,用于定位起始节点") |
||||
|
|
||||
|
# 构建起始节点匹配条件 |
||||
|
where_clause, params = self._build_where_conditions("n", node_properties, "node") |
||||
|
rel_filter = f":`{rel_type}`" if rel_type else "" |
||||
|
|
||||
|
if direction == "out": |
||||
|
pattern = f"(n:`{node_label}`)-[r{rel_filter}]->(m)" |
||||
|
elif direction == "in": |
||||
|
pattern = f"(n:`{node_label}`)<-[r{rel_filter}]-(m)" |
||||
|
elif direction == "both": |
||||
|
pattern = f"(n:`{node_label}`)-[r{rel_filter}]-(m)" |
||||
|
else: |
||||
|
raise ValueError("direction 必须是 'out', 'in' 或 'both'") |
||||
|
|
||||
|
cypher = f""" |
||||
|
MATCH {pattern} |
||||
|
WHERE {where_clause} |
||||
|
RETURN |
||||
|
elementId(n) AS sourceId, |
||||
|
head(labels(n)) AS sourceLabel, |
||||
|
n{{.*}} AS sourceProps, |
||||
|
elementId(m) AS targetId, |
||||
|
head(labels(m)) AS targetLabel, |
||||
|
m{{.*}} AS targetProps, |
||||
|
elementId(r) AS relId, |
||||
|
type(r) AS relType, |
||||
|
r{{.*}} AS relProps |
||||
|
""" |
||||
|
|
||||
|
raw_results = self.execute_read(cypher, params) |
||||
|
|
||||
|
neighbors = [] |
||||
|
for row in raw_results: |
||||
|
source = dict(row["sourceProps"]) |
||||
|
source.update({"id": row["sourceId"], "label": row["sourceLabel"]}) |
||||
|
|
||||
|
target = dict(row["targetProps"]) |
||||
|
target.update({"id": row["targetId"], "label": row["targetLabel"]}) |
||||
|
|
||||
|
relationship = { |
||||
|
"id": row["relId"], |
||||
|
"type": row["relType"], |
||||
|
"properties": row["relProps"] |
||||
|
} |
||||
|
|
||||
|
neighbors.append({ |
||||
|
"source": source, |
||||
|
"target": target, |
||||
|
"relationship": relationship |
||||
|
}) |
||||
|
|
||||
|
return neighbors |
||||
|
def delete_all_relationships_by_node_label(self, node_label: str): |
||||
|
"""删除某标签节点的所有关系(保留节点)""" |
||||
|
cypher = f"MATCH (n:`{node_label}`)-[r]-() DELETE r" |
||||
|
self.execute_write(cypher) |
||||
|
|
||||
|
def delete_all_relationships_by_node_props(self, label: str, properties: Dict[str, Any]): |
||||
|
"""按属性删除某节点的所有关系""" |
||||
|
where_clause, params = self._build_where_conditions("n", properties, "node") |
||||
|
cypher = f"MATCH (n:`{label}`) WHERE {where_clause} MATCH (n)-[r]-() DELETE r" |
||||
|
self.execute_write(cypher, params) |
||||
|
|
||||
|
def delete_relationships_advanced( |
||||
|
self, |
||||
|
source_label: Optional[str] = None, |
||||
|
source_props: Optional[Dict[str, Any]] = None, |
||||
|
target_label: Optional[str] = None, |
||||
|
target_props: Optional[Dict[str, Any]] = None, |
||||
|
rel_type: Optional[str] = None, |
||||
|
rel_properties: Optional[Dict[str, Any]] = None, |
||||
|
): |
||||
|
"""高级删除关系""" |
||||
|
a_label = f":`{source_label}`" if source_label else "" |
||||
|
b_label = f":`{target_label}`" if target_label else "" |
||||
|
r_label = f":`{rel_type}`" if rel_type else "" |
||||
|
|
||||
|
match = f"MATCH (a{a_label})-[r{r_label}]->(b{b_label})" |
||||
|
|
||||
|
where_parts = [] |
||||
|
params = {} |
||||
|
if source_props: |
||||
|
part, p = self._build_where_conditions("a", source_props, "src") |
||||
|
where_parts.append(part) |
||||
|
params.update(p) |
||||
|
if target_props: |
||||
|
part, p = self._build_where_conditions("b", target_props, "tgt") |
||||
|
where_parts.append(part) |
||||
|
params.update(p) |
||||
|
if rel_properties: |
||||
|
part, p = self._build_where_conditions("r", rel_properties, "rel") |
||||
|
where_parts.append(part) |
||||
|
params.update(p) |
||||
|
|
||||
|
cypher = match |
||||
|
if where_parts: |
||||
|
cypher += " WHERE " + " AND ".join(where_parts) |
||||
|
cypher += " DELETE r" |
||||
|
self.execute_write(cypher, params) |
||||
|
|
||||
|
def update_relationship( |
||||
|
self, |
||||
|
source_label: str, |
||||
|
source_props: Dict[str, Any], |
||||
|
target_label: str, |
||||
|
target_props: Dict[str, Any], |
||||
|
rel_type: Optional[str] = None, |
||||
|
new_rel_properties: Optional[Dict[str, Any]] = None, |
||||
|
): |
||||
|
"""更新关系属性""" |
||||
|
if not new_rel_properties: |
||||
|
raise ValueError("至少需要提供一个要更新的关系属性") |
||||
|
|
||||
|
a_label = f":`{source_label}`" |
||||
|
b_label = f":`{target_label}`" |
||||
|
r_label = f":`{rel_type}`" if rel_type else "" |
||||
|
|
||||
|
match = f"MATCH (a{a_label})-[r{r_label}]->(b{b_label})" |
||||
|
|
||||
|
where_a, p_a = self._build_where_conditions("a", source_props, "src") |
||||
|
where_b, p_b = self._build_where_conditions("b", target_props, "tgt") |
||||
|
where_clause = f"{where_a} AND {where_b}" |
||||
|
params = {**p_a, **p_b} |
||||
|
|
||||
|
set_clause = ", ".join([f"r.`{k}` = $rel_update_{k}" for k in new_rel_properties]) |
||||
|
for k, v in new_rel_properties.items(): |
||||
|
params[f"rel_update_{k}"] = v |
||||
|
|
||||
|
cypher = f"{match} WHERE {where_clause} SET {set_clause}" |
||||
|
self.execute_write(cypher, params) |
||||
|
|
||||
|
# ==================== 内部辅助方法 ==================== |
||||
|
|
||||
|
def _merge_id_and_props(self, row: Dict[str, Any]) -> Dict[str, Any]: |
||||
|
"""合并 id 和 props""" |
||||
|
props = dict(row.get("props", {})) |
||||
|
props["id"] = row["id"] |
||||
|
return props |
||||
|
|
||||
|
def _enrich_relationship(self, row: Dict[str, Any]) -> Dict[str, Any]: |
||||
|
"""格式化关系结果""" |
||||
|
source = dict(row["sourceProps"]) |
||||
|
source.update({"id": row["sourceId"], "label": row["sourceLabel"]}) |
||||
|
|
||||
|
target = dict(row["targetProps"]) |
||||
|
target.update({"id": row["targetId"], "label": row["targetLabel"]}) |
||||
|
|
||||
|
return { |
||||
|
"relId": row["relId"], |
||||
|
"type": row["type"], |
||||
|
"relProps": row["relProps"], |
||||
|
"source": source, |
||||
|
"target": target, |
||||
|
} |
||||
|
|
||||
|
def _build_match_clause(self, var: str, label: str, props: Dict[str, Any], prefix: str) -> Dict[str, Any]: |
||||
|
""" |
||||
|
构建合法的 MATCH 节点子句,属性必须在 () 内部。 |
||||
|
示例输出: (a:`Disease` {`name`: $src_name}) |
||||
|
""" |
||||
|
if not props: |
||||
|
clause = f"({var}:`{label}`)" |
||||
|
return {"clause": clause, "params": {}} |
||||
|
|
||||
|
attr_parts = [] |
||||
|
params = {} |
||||
|
for k, v in props.items(): |
||||
|
param_key = f"{prefix}_{k}" |
||||
|
attr_parts.append(f"`{k}`: ${param_key}") |
||||
|
params[param_key] = v |
||||
|
|
||||
|
attrs_str = ", ".join(attr_parts) |
||||
|
clause = f"({var}:`{label}` {{{attrs_str}}})" |
||||
|
return {"clause": clause, "params": params} |
||||
|
|
||||
|
def _build_where_conditions(self, var: str, props: Dict[str, Any], prefix: str) -> tuple[str, Dict[str, Any]]: |
||||
|
"""生成 WHERE 条件字符串和参数""" |
||||
|
if not props: |
||||
|
return "1=1", {} |
||||
|
conditions = [] |
||||
|
params = {} |
||||
|
for k, v in props.items(): |
||||
|
param_key = f"{prefix}_{k}" |
||||
|
conditions.append(f"{var}.`{k}` = ${param_key}") |
||||
|
params[param_key] = v |
||||
|
return " AND ".join(conditions), params |
||||
|
# ==================== 全局单例实例(自动初始化)==================== |
||||
|
neo4j_client = Neo4jUtil( |
||||
|
uri=NEO4J_URI, |
||||
|
username=NEO4J_USERNAME, |
||||
|
password=NEO4J_PASSWORD, |
||||
|
database=NEO4J_DATABASE |
||||
|
) |
||||
|
# 自动连接(模块导入时执行) |
||||
|
if not neo4j_client.connect(): |
||||
|
raise RuntimeError("Failed to connect to Neo4j at module load time!") |
||||
@ -0,0 +1,2 @@ |
|||||
|
# .env |
||||
|
VITE_API_BASE_URL=http://localhost:8088 |
||||
@ -0,0 +1,3 @@ |
|||||
|
# .env.development |
||||
|
VUE_APP_TITLE=知识图谱管理系统 |
||||
|
VUE_APP_BASE_API=/api |
||||
@ -0,0 +1,10 @@ |
|||||
|
# 忽略build目录下类型为js的文件的语法检查 |
||||
|
build/*.js |
||||
|
# 忽略src/assets目录下文件的语法检查 |
||||
|
src/assets |
||||
|
# 忽略public目录下文件的语法检查 |
||||
|
public |
||||
|
# 忽略当前目录下为js的文件的语法检查 |
||||
|
*.js |
||||
|
# 忽略当前目录下为vue的文件的语法检查 |
||||
|
*.vue |
||||
@ -0,0 +1,21 @@ |
|||||
|
// .eslintrc.cjs |
||||
|
module.exports = { |
||||
|
env: { |
||||
|
browser: true, |
||||
|
es2021: true, |
||||
|
'vue/setup-compiler-macros': true |
||||
|
}, |
||||
|
extends: [ |
||||
|
'@vue/eslint-config-typescript', // 如果用了 TS |
||||
|
'plugin:vue/vue3-essential', // 或 vue3-recommended / vue3-strongly-recommended |
||||
|
'eslint:recommended' |
||||
|
], |
||||
|
parserOptions: { |
||||
|
ecmaVersion: 'latest', |
||||
|
sourceType: 'module' |
||||
|
}, |
||||
|
plugins: ['vue'], |
||||
|
rules: { |
||||
|
// 自定义规则 |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,24 @@ |
|||||
|
# vue3demo |
||||
|
|
||||
|
## Project setup |
||||
|
``` |
||||
|
npm install |
||||
|
``` |
||||
|
|
||||
|
### Compiles and hot-reloads for development |
||||
|
``` |
||||
|
npm run serve |
||||
|
``` |
||||
|
|
||||
|
### Compiles and minifies for production |
||||
|
``` |
||||
|
npm run build |
||||
|
``` |
||||
|
|
||||
|
### Lints and fixes files |
||||
|
``` |
||||
|
npm run lint |
||||
|
``` |
||||
|
|
||||
|
### Customize configuration |
||||
|
See [Configuration Reference](https://cli.vuejs.org/config/). |
||||
@ -0,0 +1,10 @@ |
|||||
|
module.exports = { |
||||
|
presets: [ |
||||
|
'@vue/cli-plugin-babel/preset' |
||||
|
], |
||||
|
plugins: [ |
||||
|
'@babel/plugin-transform-class-properties', |
||||
|
'@babel/plugin-transform-private-methods', |
||||
|
'@babel/plugin-transform-private-property-in-object' |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
{ |
||||
|
"compilerOptions": { |
||||
|
"target": "es5", |
||||
|
"module": "esnext", |
||||
|
"baseUrl": "./", |
||||
|
"moduleResolution": "node", |
||||
|
"paths": { |
||||
|
"@/*": [ |
||||
|
"src/*" |
||||
|
] |
||||
|
}, |
||||
|
"lib": [ |
||||
|
"esnext", |
||||
|
"dom", |
||||
|
"dom.iterable", |
||||
|
"scripthost" |
||||
|
] |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../acorn/bin/acorn" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../acorn/bin/acorn" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\acorn\bin\acorn" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../acorn/bin/acorn" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../acorn/bin/acorn" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../ansi-html-community/bin/ansi-html" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../ansi-html-community/bin/ansi-html" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\ansi-html-community\bin\ansi-html" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../ansi-html-community/bin/ansi-html" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../ansi-html-community/bin/ansi-html" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../ansi-html-community/bin/ansi-html" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../ansi-html-community/bin/ansi-html" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../autoprefixer/bin/autoprefixer" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../autoprefixer/bin/autoprefixer" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\autoprefixer\bin\autoprefixer" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../autoprefixer/bin/autoprefixer" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../autoprefixer/bin/autoprefixer" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../autoprefixer/bin/autoprefixer" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../autoprefixer/bin/autoprefixer" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../browserslist/cli.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../browserslist/cli.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\browserslist\cli.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../browserslist/cli.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../browserslist/cli.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../browserslist/cli.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../browserslist/cli.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../cssesc/bin/cssesc" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../cssesc/bin/cssesc" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\cssesc\bin\cssesc" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../cssesc/bin/cssesc" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../cssesc/bin/cssesc" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../cssesc/bin/cssesc" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../cssesc/bin/cssesc" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../d3-dsv/bin/dsv2json.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../d3-dsv/bin/dsv2json.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\d3-dsv\bin\dsv2json.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../d3-dsv/bin/dsv2json.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../d3-dsv/bin/dsv2json.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../d3-dsv/bin/dsv2json.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../d3-dsv/bin/dsv2json.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../d3-dsv/bin/dsv2dsv.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../d3-dsv/bin/dsv2dsv.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\d3-dsv\bin\dsv2dsv.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../d3-dsv/bin/dsv2dsv.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../d3-dsv/bin/dsv2dsv.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../d3-dsv/bin/dsv2dsv.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../d3-dsv/bin/dsv2dsv.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../d3-dsv/bin/dsv2dsv.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../d3-dsv/bin/dsv2dsv.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\d3-dsv\bin\dsv2dsv.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../d3-dsv/bin/dsv2dsv.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../d3-dsv/bin/dsv2dsv.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../d3-dsv/bin/dsv2dsv.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../d3-dsv/bin/dsv2dsv.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../d3-dsv/bin/dsv2json.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../d3-dsv/bin/dsv2json.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\d3-dsv\bin\dsv2json.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../d3-dsv/bin/dsv2json.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../d3-dsv/bin/dsv2json.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../d3-dsv/bin/dsv2json.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../d3-dsv/bin/dsv2json.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../eslint/bin/eslint.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../eslint/bin/eslint.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\eslint\bin\eslint.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../eslint/bin/eslint.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../eslint/bin/eslint.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../eslint/bin/eslint.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../eslint/bin/eslint.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../flat/cli.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../flat/cli.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\flat\cli.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../flat/cli.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../flat/cli.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../flat/cli.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../flat/cli.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../d3-geo-projection/bin/geo2svg.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../d3-geo-projection/bin/geo2svg.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\d3-geo-projection\bin\geo2svg.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../d3-geo-projection/bin/geo2svg.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../d3-geo-projection/bin/geo2svg.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../d3-geo-projection/bin/geo2svg.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../d3-geo-projection/bin/geo2svg.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../d3-geo-projection/bin/geograticule.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../d3-geo-projection/bin/geograticule.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\d3-geo-projection\bin\geograticule.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../d3-geo-projection/bin/geograticule.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../d3-geo-projection/bin/geograticule.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../d3-geo-projection/bin/geograticule.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../d3-geo-projection/bin/geograticule.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../d3-geo-projection/bin/geoproject.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../d3-geo-projection/bin/geoproject.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\d3-geo-projection\bin\geoproject.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../d3-geo-projection/bin/geoproject.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../d3-geo-projection/bin/geoproject.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../d3-geo-projection/bin/geoproject.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../d3-geo-projection/bin/geoproject.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../d3-geo-projection/bin/geoquantize.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../d3-geo-projection/bin/geoquantize.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\d3-geo-projection\bin\geoquantize.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../d3-geo-projection/bin/geoquantize.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../d3-geo-projection/bin/geoquantize.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../d3-geo-projection/bin/geoquantize.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../d3-geo-projection/bin/geoquantize.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../d3-geo-projection/bin/geostitch.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../d3-geo-projection/bin/geostitch.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\d3-geo-projection\bin\geostitch.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../d3-geo-projection/bin/geostitch.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../d3-geo-projection/bin/geostitch.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../d3-geo-projection/bin/geostitch.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../d3-geo-projection/bin/geostitch.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../he/bin/he" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../he/bin/he" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\he\bin\he" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../he/bin/he" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../he/bin/he" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../he/bin/he" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../he/bin/he" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../cli-highlight/bin/highlight" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../cli-highlight/bin/highlight" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\cli-highlight\bin\highlight" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../cli-highlight/bin/highlight" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../cli-highlight/bin/highlight" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../cli-highlight/bin/highlight" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../cli-highlight/bin/highlight" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../html-minifier-terser/cli.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../html-minifier-terser/cli.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\html-minifier-terser\cli.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../html-minifier-terser/cli.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../html-minifier-terser/cli.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../html-minifier-terser/cli.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../html-minifier-terser/cli.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../is-ci/bin.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../is-ci/bin.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\is-ci\bin.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../is-ci/bin.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../is-ci/bin.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../is-ci/bin.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../is-ci/bin.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../is-docker/cli.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../is-docker/cli.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\is-docker\cli.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../is-docker/cli.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../is-docker/cli.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../is-docker/cli.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../is-docker/cli.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../js-yaml/bin/js-yaml.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../js-yaml/bin/js-yaml.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\js-yaml\bin\js-yaml.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../js-yaml/bin/js-yaml.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../jsesc/bin/jsesc" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../jsesc/bin/jsesc" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\jsesc\bin\jsesc" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../jsesc/bin/jsesc" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../jsesc/bin/jsesc" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../jsesc/bin/jsesc" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../jsesc/bin/jsesc" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../d3-dsv/bin/json2dsv.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../d3-dsv/bin/json2dsv.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\d3-dsv\bin\json2dsv.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../d3-dsv/bin/json2dsv.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../d3-dsv/bin/json2dsv.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../d3-dsv/bin/json2dsv.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../d3-dsv/bin/json2dsv.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../d3-dsv/bin/json2dsv.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../d3-dsv/bin/json2dsv.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\d3-dsv\bin\json2dsv.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../d3-dsv/bin/json2dsv.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../d3-dsv/bin/json2dsv.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../d3-dsv/bin/json2dsv.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../d3-dsv/bin/json2dsv.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../d3-dsv/bin/json2dsv.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../d3-dsv/bin/json2dsv.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\d3-dsv\bin\json2dsv.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../d3-dsv/bin/json2dsv.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../d3-dsv/bin/json2dsv.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../d3-dsv/bin/json2dsv.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../d3-dsv/bin/json2dsv.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../json5/lib/cli.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../json5/lib/cli.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\json5\lib\cli.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../json5/lib/cli.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../json5/lib/cli.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../json5/lib/cli.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../mime/cli.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../mime/cli.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mime\cli.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../mime/cli.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../mime/cli.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../mime/cli.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../mime/cli.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../mkdirp/bin/cmd.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %* |
||||
@ -0,0 +1,28 @@ |
|||||
|
#!/usr/bin/env pwsh |
||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent |
||||
|
|
||||
|
$exe="" |
||||
|
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { |
||||
|
# Fix case when both the Windows and Linux builds of Node |
||||
|
# are installed in the same directory |
||||
|
$exe=".exe" |
||||
|
} |
||||
|
$ret=0 |
||||
|
if (Test-Path "$basedir/node$exe") { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args |
||||
|
} else { |
||||
|
& "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} else { |
||||
|
# Support pipeline input |
||||
|
if ($MyInvocation.ExpectingInput) { |
||||
|
$input | & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args |
||||
|
} else { |
||||
|
& "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args |
||||
|
} |
||||
|
$ret=$LASTEXITCODE |
||||
|
} |
||||
|
exit $ret |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") |
||||
|
|
||||
|
case `uname` in |
||||
|
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; |
||||
|
esac |
||||
|
|
||||
|
if [ -x "$basedir/node" ]; then |
||||
|
exec "$basedir/node" "$basedir/../multicast-dns/cli.js" "$@" |
||||
|
else |
||||
|
exec node "$basedir/../multicast-dns/cli.js" "$@" |
||||
|
fi |
||||
@ -0,0 +1,17 @@ |
|||||
|
@ECHO off |
||||
|
GOTO start |
||||
|
:find_dp0 |
||||
|
SET dp0=%~dp0 |
||||
|
EXIT /b |
||||
|
:start |
||||
|
SETLOCAL |
||||
|
CALL :find_dp0 |
||||
|
|
||||
|
IF EXIST "%dp0%\node.exe" ( |
||||
|
SET "_prog=%dp0%\node.exe" |
||||
|
) ELSE ( |
||||
|
SET "_prog=node" |
||||
|
SET PATHEXT=%PATHEXT:;.JS;=;% |
||||
|
) |
||||
|
|
||||
|
endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%" "%dp0%\..\multicast-dns\cli.js" %* |
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue